We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b567126 commit dd025dfCopy full SHA for dd025df
src/version.rs
@@ -337,6 +337,19 @@ impl Range {
337
}
338
339
340
+impl From<pubgrub::range::Range<Version>> for Range {
341
+ fn from(range: pubgrub::range::Range<Version>) -> Self {
342
+ let spec = range.to_string();
343
+ Self { spec, range }
344
+ }
345
+}
346
+
347
+impl From<Version> for Range {
348
+ fn from(version: Version) -> Self {
349
+ pubgrub::range::Range::exact(version).into()
350
351
352
353
impl fmt::Debug for Range {
354
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
355
f.debug_tuple("Range").field(&self.spec).finish()
0 commit comments