chore(tvix): add missing clippy attributes & config
For cases where clippy lints don't apply to us, or something is misfiring, add appropriate configuration. Relates to b/321. Change-Id: I0af453910b4a4112bf685b2a8e9a73de10ec87ea Reviewed-on: https://cl.tvl.fyi/c/depot/+/9965 Reviewed-by: flokli <flokli@flokli.de> Autosubmit: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI
This commit is contained in:
parent
2e1399698b
commit
87d3fac676
4 changed files with 9 additions and 0 deletions
6
tvix/clippy.toml
Normal file
6
tvix/clippy.toml
Normal file
|
@ -0,0 +1,6 @@
|
|||
# prevents a false-positive lint on our types containing bytes::Bytes
|
||||
# https://rust-lang.github.io/rust-clippy/master/index.html#/mutable_key_type
|
||||
ignore-interior-mutability = [
|
||||
"bytes::Bytes",
|
||||
"tvix_castore::digests::B3Digest"
|
||||
]
|
|
@ -288,6 +288,7 @@ impl<'code, 'co, 'ro> Evaluation<'code, 'co, 'ro> {
|
|||
|
||||
/// Internal helper function for common parsing & compilation logic
|
||||
/// between the public functions.
|
||||
#[allow(clippy::too_many_arguments)] // internal API, no point making an indirection type
|
||||
fn parse_compile_internal(
|
||||
result: &mut EvaluationResult,
|
||||
code: &str,
|
||||
|
|
|
@ -469,6 +469,7 @@ impl Value {
|
|||
|
||||
// Special-case for derivation comparisons: If both attribute sets
|
||||
// have `type = derivation`, compare them by `outPath`.
|
||||
#[allow(clippy::single_match)] // might need more match arms later
|
||||
match (a1.select("type"), a2.select("type")) {
|
||||
(Some(v1), Some(v2)) => {
|
||||
let s1 = generators::request_force(&co, v1.clone()).await.to_str();
|
||||
|
|
|
@ -93,6 +93,7 @@ pub struct TvixStoreFs {
|
|||
inode_tracker: RwLock<InodeTracker>,
|
||||
|
||||
/// This holds all open file handles
|
||||
#[allow(clippy::type_complexity)]
|
||||
file_handles: RwLock<HashMap<u64, Arc<tokio::sync::Mutex<Box<dyn BlobReader>>>>>,
|
||||
|
||||
next_file_handle: AtomicU64,
|
||||
|
|
Loading…
Reference in a new issue