-
Notifications
You must be signed in to change notification settings - Fork 66
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: display merged candidates (#326)
feat: adds functionality that gives the dependency provider the option to display the merged candidates for errors in a way it sees fit A default display provider is given. The conda code overwrites this provider Also removes `VersionTrait` as we no longer need this. Removed this both from the test and conda code
- Loading branch information
Showing
7 changed files
with
155 additions
and
109 deletions.
There are no files selected for viewing
56 changes: 28 additions & 28 deletions
56
crates/rattler_conda_types/src/generic_virtual_package.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,28 @@ | ||
use crate::{PackageName, Version}; | ||
use std::fmt::{Display, Formatter}; | ||
|
||
/// A `GenericVirtualPackage` is a Conda package description that contains a `name` and a | ||
/// `version` and a `build_string`. | ||
#[derive(Clone, Debug, Eq, PartialEq, Hash)] | ||
pub struct GenericVirtualPackage { | ||
/// The name of the package | ||
pub name: PackageName, | ||
|
||
/// The version of the package | ||
pub version: Version, | ||
|
||
/// The build identifier of the package. | ||
pub build_string: String, | ||
} | ||
|
||
impl Display for GenericVirtualPackage { | ||
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { | ||
write!( | ||
f, | ||
"{}={}={}", | ||
&self.name.as_normalized(), | ||
&self.version, | ||
&self.build_string | ||
) | ||
} | ||
} | ||
use crate::{PackageName, Version}; | ||
use std::fmt::{Display, Formatter}; | ||
|
||
/// A `GenericVirtualPackage` is a Conda package description that contains a `name` and a | ||
/// `version` and a `build_string`. | ||
#[derive(Clone, Debug, Eq, PartialEq, Hash, Ord, PartialOrd)] | ||
pub struct GenericVirtualPackage { | ||
/// The name of the package | ||
pub name: PackageName, | ||
|
||
/// The version of the package | ||
pub version: Version, | ||
|
||
/// The build identifier of the package. | ||
pub build_string: String, | ||
} | ||
|
||
impl Display for GenericVirtualPackage { | ||
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { | ||
write!( | ||
f, | ||
"{}={}={}", | ||
&self.name.as_normalized(), | ||
&self.version, | ||
&self.build_string | ||
) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.