Compare commits
5 Commits
90feca00b6
...
8d0c48ae0f
| Author | SHA1 | Date | |
|---|---|---|---|
|
8d0c48ae0f
|
|||
|
d286909fb3
|
|||
|
4d14315c82
|
|||
|
7f84974f82
|
|||
|
4a2d3888e2
|
@@ -1,4 +1,3 @@
|
||||
#![deny(unused_imports)]
|
||||
#![allow(clippy::missing_safety_doc)]
|
||||
|
||||
use core::slice;
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
#![deny(unused_imports)]
|
||||
|
||||
use core::slice;
|
||||
use gentoo_utils::{Parseable, atom::Version};
|
||||
use mon::{Parser, input::InputIter};
|
||||
use gentoo_utils::{
|
||||
Parseable,
|
||||
atom::{Atom, Version},
|
||||
};
|
||||
use mon::{Parser, ParserFinishedError, input::InputIter};
|
||||
use std::{
|
||||
cmp::Ordering,
|
||||
io::{BufRead, BufReader, Write},
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
build/rust-project.json
|
||||
@@ -646,6 +646,14 @@ mod test {
|
||||
|
||||
use crate::Parseable;
|
||||
|
||||
macro_rules! assert_eq_display {
|
||||
($a:expr, $b:expr) => {
|
||||
if $a != $b {
|
||||
panic!("{} != {}", $a, $b);
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
macro_rules! assert_cmp_display {
|
||||
($a:expr, $b:expr, $ordering:expr) => {
|
||||
if $a.cmp(&$b) != $ordering {
|
||||
@@ -760,7 +768,6 @@ mod test {
|
||||
.parse_finished(InputIter::new("1.2.0a_alpha1_beta2-r1-8"))
|
||||
.unwrap();
|
||||
|
||||
#[allow(clippy::single_element_loop)]
|
||||
for (version_str, expected) in [("1.2.0", Ordering::Greater)] {
|
||||
let version = Version::parser()
|
||||
.parse_finished(InputIter::new(version_str))
|
||||
|
||||
@@ -64,7 +64,7 @@ pub enum Error {
|
||||
pub struct Profile {
|
||||
#[get(kind = "deref")]
|
||||
path: PathBuf,
|
||||
eapi: Eapi,
|
||||
eapi: Option<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)) => eapi,
|
||||
Ok(Ok(eapi)) => Some(eapi),
|
||||
Ok(Err(rest)) => return Err(Error::Parser(rest)),
|
||||
Err(e) if matches!(e.kind(), io::ErrorKind::NotFound) => Eapi::parse("0").unwrap(),
|
||||
Err(e) if matches!(e.kind(), io::ErrorKind::NotFound) => None,
|
||||
Err(e) => return Err(Error::Io(eapi_path, e)),
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user