File tree 3 files changed +8
-8
lines changed 3 files changed +8
-8
lines changed Original file line number Diff line number Diff line change 18
18
19
19
include :
20
20
# Test MSRV
21
- - rust : 1.36 .0
21
+ - rust : 1.50 .0
22
22
TARGET : x86_64-unknown-linux-gnu
23
23
24
24
# Test nightly but don't fail
Original file line number Diff line number Diff line change @@ -8,8 +8,6 @@ NOR-flash & NAND-flash, both external and internal.
8
8
9
9
## [ API reference]
10
10
11
- [ API reference ] : https://docs.rs/embedded-storage
12
-
13
11
## How-to: add a new trait
14
12
15
13
This is the suggested approach to adding a new trait to ` embedded-storage `
@@ -37,7 +35,7 @@ These issues / PRs will be labeled as `proposal`s in the issue tracker.
37
35
38
36
## Minimum Supported Rust Version (MSRV)
39
37
40
- This crate is guaranteed to compile on stable Rust 1.36 .0 and up. It * might*
38
+ This crate is guaranteed to compile on stable Rust 1.50 .0 and up. It * might*
41
39
compile with older versions but that may change in any new patch release.
42
40
43
41
## License
@@ -55,3 +53,5 @@ at your option.
55
53
Unless you explicitly state otherwise, any contribution intentionally submitted
56
54
for inclusion in the work by you, as defined in the Apache-2.0 license, shall be
57
55
dual licensed as above, without any additional terms or conditions.
56
+
57
+ [ API reference ] : https://docs.rs/embedded-storage
Original file line number Diff line number Diff line change @@ -225,11 +225,11 @@ where
225
225
if is_subset {
226
226
// Use `merge_buffer` as allocation for padding `data` to `WRITE_SIZE`
227
227
let offset = addr as usize % S :: WRITE_SIZE ;
228
- let alligned_end = data. len ( ) % S :: WRITE_SIZE ;
229
- self . merge_buffer [ ..S :: WRITE_SIZE ] . fill ( 0xff ) ;
230
- self . merge_buffer [ offset..data. len ( ) ] . copy_from_slice ( data) ;
228
+ let aligned_end = data. len ( ) % S :: WRITE_SIZE + offset + data . len ( ) ;
229
+ self . merge_buffer [ ..aligned_end ] . fill ( 0xff ) ;
230
+ self . merge_buffer [ offset..offset + data. len ( ) ] . copy_from_slice ( data) ;
231
231
self . storage
232
- . try_write ( addr - offset as u32 , & self . merge_buffer [ ..S :: WRITE_SIZE ] ) ?;
232
+ . try_write ( addr - offset as u32 , & self . merge_buffer [ ..aligned_end ] ) ?;
233
233
} else {
234
234
self . storage . try_erase ( page. start , page. end ( ) ) ?;
235
235
self . merge_buffer [ ..S :: ERASE_SIZE ]
You can’t perform that action at this time.
0 commit comments