Skip to content

Commit f423cf2

Browse files
committed
Fix warnings introduced by new Rust 1.79 release
Signed-off-by: Ryan Levick <[email protected]>
1 parent 5b4879d commit f423cf2

File tree

2 files changed

+2
-6
lines changed

2 files changed

+2
-6
lines changed

crates/llm-local/src/bert.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
///
55
/// TODO: Remove this file when a new release of Candle makes it obsolete.
66
use anyhow::{bail, Result};
7-
use candle::{DType, Device, Tensor};
7+
use candle::{DType, Tensor};
88
use candle_nn::{Embedding, VarBuilder};
99
use serde::Deserialize;
1010

@@ -503,10 +503,9 @@ impl BertEncoder {
503503
}
504504

505505
// https://github.com/huggingface/transformers/blob/6eedfa6dd15dc1e22a55ae036f681914e5a0d9a1/src/transformers/models/bert/modeling_bert.py#L874
506-
pub struct BertModel {
506+
pub(crate) struct BertModel {
507507
embeddings: BertEmbeddings,
508508
encoder: BertEncoder,
509-
pub device: Device,
510509
span: tracing::Span,
511510
}
512511

@@ -535,7 +534,6 @@ impl BertModel {
535534
Ok(Self {
536535
embeddings,
537536
encoder,
538-
device: vb.device().clone(),
539537
span: tracing::span!(tracing::Level::TRACE, "model"),
540538
})
541539
}

crates/templates/src/test_built_ins/mod.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#![cfg(test)]
2-
31
// Module for unit-testing the built-in templates when a full integration test would be overkill.
42
// If your test involves invoking the Spin CLI, or builds or runs an application, use
53
// an integration test.

0 commit comments

Comments
 (0)