summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/repo/profile/mod.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/repo/profile/mod.rs b/src/repo/profile/mod.rs
index 31861b9..8bdb724 100644
--- a/src/repo/profile/mod.rs
+++ b/src/repo/profile/mod.rs
@@ -64,7 +64,7 @@ pub enum Error {
pub struct Profile {
#[get(kind = "deref")]
path: PathBuf,
- eapi: Option<Eapi>,
+ eapi: Eapi,
deprecated: Option<String>,
#[get(kind = "deref")]
parents: Vec<Profile>,
@@ -108,9 +108,9 @@ impl Profile {
let eapi = match fs::read_to_string(&eapi_path)
.map(|s| Eapi::parse(s.trim()).map_err(str::to_string))
{
- Ok(Ok(eapi)) => Some(eapi),
+ Ok(Ok(eapi)) => eapi,
Ok(Err(rest)) => return Err(Error::Parser(rest)),
- Err(e) if matches!(e.kind(), io::ErrorKind::NotFound) => None,
+ Err(e) if matches!(e.kind(), io::ErrorKind::NotFound) => Eapi::parse("0").unwrap(),
Err(e) => return Err(Error::Io(eapi_path, e)),
};