ok/jj
1
0
Fork 0
forked from mirrors/jj
jj/lib
Alexander Potashev 2d81cf9156 Fix build when bstr is also imported.
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.
2023-08-15 22:47:56 +02:00
..
benches cargo: rename crates from jujutsu/jujutsu-lib to jj-cli/jj-lib 2023-07-09 06:40:43 +02:00
gen-protos cargo: unify a lot of crate metadata in the workspace 2023-08-06 16:44:33 -05:00
src Fix build when bstr is also imported. 2023-08-15 22:47:56 +02:00
tests merged_tree: add path_value() 2023-08-15 07:56:55 -07:00
testutils tests: move commit_transactions() helper to testutils 2023-08-10 06:27:16 +09:00
Cargo.toml cargo: unify a lot of crate metadata in the workspace 2023-08-06 16:44:33 -05:00