Skip to content

Commit 430865e

Browse files
committed
Refactor SDKErr enum to be non-exhaustive and update error message formatting
1 parent 111ac61 commit 430865e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/lib.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
#![warn(clippy::pedantic)]
22
use std::path::Path;
33

4+
#[derive(Debug)]
5+
#[non_exhaustive]
46
pub enum SDKErr {
57
SrcFileNotFound(String),
68
}
@@ -12,7 +14,7 @@ pub fn build_code_model(files: Vec<String>) -> Result<bool, SDKErr> {
1214
for file in files {
1315
let path = Path::new(&file);
1416
if !path.exists() {
15-
return Err(SDKErr::SrcFileNotFound(format!("File not found: {file}")));
17+
return Err(SDKErr::SrcFileNotFound(format!("file not found: {file}")));
1618
}
1719
}
1820
Ok(true)

0 commit comments

Comments
 (0)