Commit 3fda2fb 1 parent cdcb99f commit 3fda2fb Copy full SHA for 3fda2fb
File tree 4 files changed +7
-11
lines changed
4 files changed +7
-11
lines changed Original file line number Diff line number Diff line change 1
1
[package ]
2
2
name = " littlefs2"
3
3
description = " Idiomatic Rust API for littlefs"
4
- version = " 0.3.0 "
4
+ version = " 0.3.1 "
5
5
authors = [" Nicolas Stalder <n@stalder.io>" , " Brandon Edens <brandonedens@gmail.com>" ]
6
6
edition = " 2018"
7
7
license = " Apache-2.0 OR MIT"
Original file line number Diff line number Diff line change @@ -67,11 +67,11 @@ pub trait Storage {
67
67
///// to the C backend.
68
68
//type FILENAME_MAX_PLUS_ONE: ArrayLength<u8>;
69
69
70
- /// Maximum length of a path plus one. Necessary to convert Rust string slices
71
- /// to C strings, which requires an allocation for the terminating
72
- /// zero-byte. If in doubt, set to `FILENAME_MAX_PLUS_ONE`.
73
- /// Must be larger than `FILENAME_MAX_PLUS_ONE`.
74
- type PATH_MAX_PLUS_ONE : ArrayLength < u8 > ;
70
+ // // / Maximum length of a path plus one. Necessary to convert Rust string slices
71
+ // // / to C strings, which requires an allocation for the terminating
72
+ // // / zero-byte. If in doubt, set to `FILENAME_MAX_PLUS_ONE`.
73
+ // // / Must be larger than `FILENAME_MAX_PLUS_ONE`.
74
+ // type PATH_MAX_PLUS_ONE: ArrayLength<u8>;
75
75
76
76
///// Maximum size of file. Stored in superblock.
77
77
///// Defaults to 2_147_483_647 (or u31, to avoid sign issues in the C code).
@@ -136,8 +136,6 @@ mod future {
136
136
// TODO: this supposedly influences whether files are inlined or not. Clarify
137
137
type CACHE_SIZE ;
138
138
type LOOKAHEADWORDS_SIZE ;
139
- // not part of littlefs
140
- type PATH_MAX_PLUS_ONE ;
141
139
}
142
140
143
141
pub trait RuntimeParameters {
Original file line number Diff line number Diff line change @@ -96,7 +96,7 @@ impl<Storage: driver::Storage> Allocation<Storage> {
96
96
debug_assert ! ( filename_max_plus_one <= 1_022 +1 ) ;
97
97
// limitation of ll-bindings
98
98
debug_assert ! ( filename_max_plus_one == 255 +1 ) ;
99
- let path_max_plus_one: u32 = < Storage as driver :: Storage > :: PATH_MAX_PLUS_ONE :: to_u32 ( ) ;
99
+ let path_max_plus_one: u32 = crate :: consts :: PATH_MAX_PLUS_ONE as _ ;
100
100
// TODO: any upper limit?
101
101
debug_assert ! ( path_max_plus_one >= filename_max_plus_one) ;
102
102
let file_max = crate :: consts:: FILEBYTES_MAX ;
Original file line number Diff line number Diff line change @@ -50,7 +50,6 @@ macro_rules! ram_storage { (
50
50
const BLOCK_SIZE : usize = $block_size;
51
51
const BLOCK_COUNT : usize = $block_count;
52
52
type LOOKAHEADWORDS_SIZE = $lookaheadwords_size;
53
- type PATH_MAX_PLUS_ONE = $path_max_plus_one;
54
53
55
54
fn read( & self , offset: usize , buf: & mut [ u8 ] ) -> $Result<usize > {
56
55
let read_size: usize = Self :: READ_SIZE ;
@@ -180,7 +179,6 @@ macro_rules! const_ram_storage { (
180
179
const BLOCK_SIZE : usize = $block_size;
181
180
const BLOCK_COUNT : usize = $block_count;
182
181
type LOOKAHEADWORDS_SIZE = $lookaheadwords_size;
183
- type PATH_MAX_PLUS_ONE = $path_max_plus_one;
184
182
185
183
fn read( & self , offset: usize , buf: & mut [ u8 ] ) -> $Result<usize > {
186
184
let read_size: usize = Self :: READ_SIZE ;
You can’t perform that action at this time.
0 commit comments