Skip to content

Commit 921adca

Browse files
committed
Add "newest" alias to match version
In addition to #26
1 parent 654f3f6 commit 921adca

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/web/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,8 @@ fn match_version(conn: &Connection, name: &str, version: Option<&str>) -> Option
142142
Ok(p) => Some(p.into_owned()),
143143
Err(_) => None,
144144
}
145-
}).unwrap_or("*".to_string());
145+
}).map(|v| if v == "newest" { "*".to_owned() } else { v })
146+
.unwrap_or("*".to_string());
146147

147148
let versions = {
148149
let mut versions = Vec::new();

0 commit comments

Comments
 (0)