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

@ -659,7 +659,7 @@ struct T5Stack {
impl T5Stack {
fn load(decoder: bool, vb: VarBuilder, shared: &Arc<Embedding>, cfg: &Config) -> Result<Self> {
let block = (0..cfg.num_layers)
.map(|i| T5Block::load(i == 0, decoder, vb.pp(&format!("block.{i}")), cfg))
.map(|i| T5Block::load(i == 0, decoder, vb.pp(format!("block.{i}")), cfg))
.collect::<Result<Vec<_>>>()?;
let final_layer_norm = T5LayerNorm::load(
cfg.d_model,