Skip to content

Commit

Permalink
Prepare for release
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicolas Stalder committed Feb 26, 2021
1 parent 375ecea commit f4100fb
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 2,099 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

## [Unreleased]

## [v0.2.1] - 2021-02-02
## [v0.2.1] - 2021-02-26

### Changed
- PathBuf::from errors on embedded nuls, and prevents ending
with nuls
- get rid of ufmt (oversight in 0.2 release)
- get rid of dead code (oversight in 0.2 release)

## [v0.2.0] - 2021-02-02

Expand Down
17 changes: 3 additions & 14 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,10 @@ categories = ["embedded", "filesystem", "no-std"]
repository = "https://github.com/nickray/littlefs2"

[dependencies]
bitflags = "1.0.4"
bitflags = "1"
cty = "0.2.1"
generic-array = "0.14.2"
heapless = "0.6.0"
# heapless-bytes = { path = "../heapless-bytes", optional = true }

# Listed as regular dependency behind feature flag,
# since dev-dependencies cannot be optional, and we
# actually want to both keep our dependencies minimal
# and test the `no_std` situation mainly.
# Run UI tests with `cargo test --features ui-tests`.
trybuild = { version = "1.0", optional = true }
typenum = "1.12.0"
ufmt = "0.1.0"
heapless = "0.6"

[dependencies.cstr_core]
default-features = false
Expand Down Expand Up @@ -61,6 +51,7 @@ optional = true
[dev-dependencies]
ssmarshal = "1"
serde = { version = "1.0", default-features = false, features = ["derive"] }
# trybuild = "1"

[features]
default = ["dir-entry-path", "serde"]
Expand All @@ -70,8 +61,6 @@ dir-entry-path = []
ll-assertions = ["littlefs2-sys/assertions"]
# enable trace in backend C code
ll-trace = ["littlefs2-sys/trace"]
# enable to run UI tests
ui-tests = ["trybuild"]

# TODO: LFS_NAME_MAX (and maybe other sizes) are baked into the
# compiled C library. For instance, the `lfs_info` struct has a
Expand Down
7 changes: 4 additions & 3 deletions src/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ use core::{cell::RefCell, cmp, mem, slice};
use bitflags::bitflags;
use generic_array::typenum::marker_traits::Unsigned;
use littlefs2_sys as ll;
use serde::{Deserialize, Serialize};

// so far, don't need `heapless-bytes`.
pub type Bytes<SIZE> = generic_array::GenericArray<u8, SIZE>;
Expand Down Expand Up @@ -154,7 +155,7 @@ pub struct Filesystem<'a, Storage: driver::Storage> {
}

/// Regular file vs directory
#[derive(Clone,Copy,Debug,Eq,Hash,PartialEq,ufmt::derive::uDebug,serde::Serialize,serde::Deserialize)]
#[derive(Clone,Copy,Debug,Eq,Hash,PartialEq,Serialize,Deserialize)]
pub enum FileType {
File,
Dir,
Expand All @@ -173,7 +174,7 @@ impl FileType {
}

/// File type (regular vs directory) and size of a file.
#[derive(Clone,Debug,Eq,PartialEq,ufmt::derive::uDebug,serde::Serialize,serde::Deserialize)]
#[derive(Clone,Debug,Eq,PartialEq,Serialize,Deserialize)]
pub struct Metadata {
file_type: FileType,
size: usize,
Expand Down Expand Up @@ -960,7 +961,7 @@ impl<S: driver::Storage> io::Write for File<'_, '_, S>
fn flush(&self) -> Result<()> { Ok(()) }
}

#[derive(Clone,Debug,PartialEq,Eq, ufmt::derive::uDebug,serde::Serialize,serde::Deserialize)]
#[derive(Clone,Debug,PartialEq,Eq,Serialize,Deserialize)]
pub struct DirEntry {
file_name: PathBuf,
metadata: Metadata,
Expand Down
Loading

0 comments on commit f4100fb

Please sign in to comment.