forked from mirrors/jj
2d81cf9156
Add type annotation to `vec` to avoid the following build error if you additionally import `bstr`: ``` ~/jj> cargo test Compiling jj-lib v0.8.0 (/home/aspotashev/jj/lib) warning: unused import: `bstr` --> lib/src/default_index_store.rs:30:5 | 30 | use bstr; | ^^^^ | = note: `#[warn(unused_imports)]` on by default error[E0282]: type annotations needed --> lib/src/default_index_store.rs:564:14 | 564 | .as_mut() | ^^^^^^ 565 | .write_u32::<LittleEndian>(parent_overflow.len() as u32) | --------- type must be known at this point | help: try using a fully qualified path to specify the expected types | 563 | <[u8] as AsMut<T>>::as_mut(&mut buf[parent_overflow_offset..parent_overflow_offset + 4]) | +++++++++++++++++++++++++++++++ ~ For more information about this error, try `rustc --explain E0282`. warning: `jj-lib` (lib) generated 1 warning error: could not compile `jj-lib` (lib) due to previous error; 1 warning emitted ``` Reason to support `bstr` being imported: in a Bazel environment where crates are imported with certain features enabled, jj-lib may pull in bstr as part of the following dependency chain: jj-lib -> insta -> similar -> bstr. |
||
---|---|---|
.. | ||
benches | ||
gen-protos | ||
src | ||
tests | ||
testutils | ||
Cargo.toml |