mirror of
https://github.com/storytold/craft-libs.git
synced 2026-11-18 08:15:29 +00:00
craft-cloud-local test: name the opened-documents type
The current clippy warns on the inline Arc Mutex tuple type in the test harness. A named OpenedDocs alias carries the same meaning.
This commit is contained in:
1 parent
07d2747efc
commit
a170341225
2 files changed
+23
-1
No files matched your search
Generated
+19
@@ -1616,6 +1616,24 @@ dependencies = [
|
||||
"craft-media-testkit",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "craft-cloud"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"serde",
|
||||
"thiserror 2.0.21",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "craft-cloud-local"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"craft-cloud",
|
||||
"craft-ui",
|
||||
"egui",
|
||||
"tempfile",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "craft-cms"
|
||||
version = "0.1.0"
|
||||
@@ -3191,6 +3209,7 @@ dependencies = [
|
||||
name = "craft-ui"
|
||||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"craft-cloud",
|
||||
"craft-fonts-build",
|
||||
"craft-i18n",
|
||||
"eframe",
|
||||
|
||||
@@ -12,6 +12,9 @@ use craft_ui::cloud::{self, Account, CloudApp, CloudFiles, Destination, Document
|
||||
|
||||
const NOTE: DocumentKind = DocumentKind { extensions: &["txt"], mimes: &["text/plain"], noun: "note", default_extension: "txt" };
|
||||
|
||||
/// A document the harness was told to open: its name and its bytes.
|
||||
type OpenedDocs = Arc<Mutex<Vec<(String, Vec<u8>)>>>;
|
||||
|
||||
/// The least a [`CloudApp`] can be. What it was told to open is recorded, so a
|
||||
/// round trip can be checked by content and not only by the entry metadata
|
||||
/// `craft_ui` itself remembers.
|
||||
@@ -19,7 +22,7 @@ struct Harness {
|
||||
cloud: CloudFiles,
|
||||
share: craft_ui::share::ShareDialog,
|
||||
presence: craft_ui::presence::PresenceBar,
|
||||
opened: Arc<Mutex<Vec<(String, Vec<u8>)>>>,
|
||||
opened: OpenedDocs,
|
||||
said: Arc<Mutex<Vec<String>>>,
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user