Skip to content

Commit c33b4a5

Browse files
committed
doc comments on MetaValError, remove unused variant
1 parent cdb2cef commit c33b4a5

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

llama-cpp-2/src/lib.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,17 +82,18 @@ pub enum ChatTemplateError {
8282
Utf8Error(#[from] std::str::Utf8Error),
8383
}
8484

85+
/// Failed fetching metadata value
8586
#[derive(Debug, Eq, PartialEq, thiserror::Error)]
8687
pub enum MetaValError {
87-
#[error("model does not have metadata key: {0}")]
88-
MissingKey(String),
89-
88+
/// The provided string contains an unexpected null-byte
9089
#[error("null byte in string {0}")]
9190
NullError(#[from] NulError),
9291

92+
/// The returned data contains invalid UTF8 data
9393
#[error("FromUtf8Error {0}")]
9494
FromUtf8Error(#[from] FromUtf8Error),
9595

96+
/// Got negative return value. This happens if the key or index queried does not exist.
9697
#[error("Negative return value. Likely due to a missing index or key. Got return value: {0}")]
9798
NegativeReturn(i32),
9899
}

0 commit comments

Comments
 (0)