Clippy fixes for 1.81.0. (#2461)

* Clippy fixes for 1.81.0.

* Another fix.
This commit is contained in:
Laurent Mazare
2024-09-05 22:46:55 +01:00
committed by GitHub
parent c02b7c3272
commit e3261216b1
17 changed files with 28 additions and 29 deletions

View File

@ -260,7 +260,7 @@ impl AudioEncoder {
let positional_embedding = sinusoids(n_ctx, n_state, vb.device())?;
let blocks = (0..cfg.encoder_layers)
.map(|i| {
ResidualAttentionBlock::load(n_state, n_head, false, vb.pp(&format!("layers.{i}")))
ResidualAttentionBlock::load(n_state, n_head, false, vb.pp(format!("layers.{i}")))
})
.collect::<Result<Vec<_>>>()?;
let ln_post = layer_norm(n_state, vb.pp("layer_norm"))?;
@ -321,7 +321,7 @@ impl TextDecoder {
let positional_embedding = vb.get((n_ctx, n_state), "embed_positions.weight")?;
let blocks = (0..cfg.decoder_layers)
.map(|i| {
ResidualAttentionBlock::load(n_state, n_head, true, vb.pp(&format!("layers.{i}")))
ResidualAttentionBlock::load(n_state, n_head, true, vb.pp(format!("layers.{i}")))
})
.collect::<Result<Vec<_>>>()?;
let ln = layer_norm(n_state, vb.pp("layer_norm"))?;