Changed a type
This commit is contained in:
parent
5a090f5e53
commit
a9f69c1160
3 changed files with 2 additions and 12 deletions
7
Cargo.lock
generated
7
Cargo.lock
generated
|
@ -416,7 +416,6 @@ dependencies = [
|
||||||
"reqwest",
|
"reqwest",
|
||||||
"tokio",
|
"tokio",
|
||||||
"url",
|
"url",
|
||||||
"uuid",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
@ -943,12 +942,6 @@ dependencies = [
|
||||||
"percent-encoding",
|
"percent-encoding",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "uuid"
|
|
||||||
version = "0.8.2"
|
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
||||||
checksum = "bc5cf98d8186244414c848017f0e2676b3fcb46807f6668a97dfe67359a3c4b7"
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "vcpkg"
|
name = "vcpkg"
|
||||||
version = "0.2.11"
|
version = "0.2.11"
|
||||||
|
|
|
@ -10,7 +10,6 @@ edition = "2018"
|
||||||
env_logger = "0.8"
|
env_logger = "0.8"
|
||||||
log = "0.4"
|
log = "0.4"
|
||||||
tokio = { version = "1.2", features = ["macros", "rt"]}
|
tokio = { version = "1.2", features = ["macros", "rt"]}
|
||||||
uuid = "0.8"
|
|
||||||
reqwest = "0.11"
|
reqwest = "0.11"
|
||||||
minidom = "0.13"
|
minidom = "0.13"
|
||||||
url = "2.2"
|
url = "2.2"
|
||||||
|
|
|
@ -1,6 +1,4 @@
|
||||||
use uuid::Uuid;
|
pub type TaskId = String; // This is an HTML "etag"
|
||||||
|
|
||||||
pub type TaskId = Uuid;
|
|
||||||
|
|
||||||
/// A to-do task
|
/// A to-do task
|
||||||
#[derive(Clone, Debug)]
|
#[derive(Clone, Debug)]
|
||||||
|
@ -11,7 +9,7 @@ pub struct Task {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Task {
|
impl Task {
|
||||||
pub fn id(&self) -> Uuid { self.id }
|
pub fn id(&self) -> &TaskId { &self.id }
|
||||||
pub fn name(&self) -> &str { &self.name }
|
pub fn name(&self) -> &str { &self.name }
|
||||||
pub fn completed(&self) -> bool { self.completed }
|
pub fn completed(&self) -> bool { self.completed }
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue