diff --git a/CHANGELOG.md b/CHANGELOG.md index a0f0be6..9e31e1b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,10 +1,12 @@ # Changelog -## [0.3.2] - Unreleased +## [0.4.0] - Unreleased ### Added - filesystem example in basic.rs - URL support in filesystem API on native targets when enabling the http feature + This breaks API compatibility as File::is_ready(&self) becomes File::is_ready(&mut self) + ## [0.3.1] - 2023-01-13 ### Fixed - fixed wasm target compilation diff --git a/Cargo.toml b/Cargo.toml index b8c448b..ffca19b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "uni-app" -version = "0.3.2" +version = "0.4.0" authors = [ "Edwin Cheng ", "jice " diff --git a/examples/Cargo.toml b/examples/Cargo.toml index 189aa01..774c57f 100644 --- a/examples/Cargo.toml +++ b/examples/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "uni-app-example" -version = "0.3.2" +version = "0.4.0" edition = "2021" license = "MIT" repository = "https://github.com/unrust/uni-app" diff --git a/src/native_fs.rs b/src/native_fs.rs index 8b46677..52a1c44 100644 --- a/src/native_fs.rs +++ b/src/native_fs.rs @@ -66,7 +66,7 @@ impl File { /// On web target, files are loaded asynchronously. /// You have to poll [`File::is_ready`] until it returns true. /// Only then you can call [`File::read_binary`] or [`File::read_text`]. - pub fn is_ready(&self) -> bool { + pub fn is_ready(&mut self) -> bool { true } } diff --git a/src/web_fs.rs b/src/web_fs.rs index f79c3c4..106d51f 100644 --- a/src/web_fs.rs +++ b/src/web_fs.rs @@ -63,7 +63,7 @@ impl FileSystem { } impl File { - pub fn is_ready(&self) -> bool { + pub fn is_ready(&mut self) -> bool { let bs = self.buffer_state.borrow(); match *bs { BufferState::Empty => false,