Skip to content

Commit c39faee

Browse files
committed
feat: update easy_storage to version 0.3.1 and use wildcard dependencies
1 parent 9bd6835 commit c39faee

3 files changed

Lines changed: 5 additions & 23 deletions

File tree

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
[package]
22
name = "easy_storage"
3-
version = "0.3.0"
3+
version = "0.3.1"
44
edition = "2024"
55
authors = [ "Uliboooo <uliboulibo@gmail.com>"]
66
description = "Provides a trait to easily save and load structs in JSON or TOML format."
77
license = "MIT OR Apache-2.0"
88
repository = "https://github.com/Uliboooo/easy_storage"
99

1010
[dependencies]
11-
serde = { version = "1.0.219", features = ["derive"] }
12-
toml = { version = "0.9.5"}
13-
serde_json = { version = "1.0.142"}
11+
serde = { version = "1.0.*", features = ["derive"] }
12+
toml = { version = "0.9.*"}
13+
serde_json = { version = "1.0.*"}
1414

src/lib.rs

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -153,15 +153,6 @@ pub trait Storeable: Serialize + DeserializeOwned + Sized {
153153
{
154154
let format = path_to_format(&path)?;
155155
self.save(path, true, format)
156-
// if let Some(v) = path.as_ref().extension().map(|f| f.to_str()).flatten() {
157-
// match v {
158-
// "json" => self.save(path, new_create, Format::Json),
159-
// "toml" => self.save(path, new_create, Format::Toml),
160-
// _ => Err(Error::ExtensionDoesNotExist),
161-
// }
162-
// } else {
163-
// Err(Error::ExtensionDoesNotExist)
164-
// }
165156
}
166157

167158
/// Load from file.
@@ -200,15 +191,6 @@ pub trait Storeable: Serialize + DeserializeOwned + Sized {
200191
{
201192
let format = path_to_format(&path)?;
202193
Self::load(path, format)
203-
// if let Some(v) = path.as_ref().extension().map(|f| f.to_str()).flatten() {
204-
// match v {
205-
// "json" => Self::load(path, Format::Json),
206-
// "toml" => Self::load(path, Format::Toml),
207-
// _ => Err(Error::ExtensionDoesNotExist),
208-
// }
209-
// } else {
210-
// Err(Error::ExtensionDoesNotExist)
211-
// }
212194
}
213195
}
214196

0 commit comments

Comments
 (0)