JavaScript is disabled, refresh for a better experience. ambee/giterated

ambee/giterated

Git repository hosting, collaboration, and discovery for the Fediverse.

Fixed imports!

Amber - ⁨2⁩ years ago

parent: tbd commit: ⁨ef0e853

⁨giterated-daemon/src/lib.rs⁩ - ⁨520⁩ bytes
Raw
1 use std::str::FromStr;
2
3 use semver::{Version, VersionReq};
4
5 pub mod authentication;
6 pub mod authorization;
7 pub mod backend;
8 pub mod cache_backend;
9 pub mod connection;
10 pub mod database_backend;
11 pub mod federation;
12 pub mod keys;
13 pub mod message;
14
15 #[macro_use]
16 extern crate tracing;
17
18 pub fn version() -> Version {
19 Version::from_str(env!("CARGO_PKG_VERSION")).unwrap()
20 }
21
22 pub fn validate_version(other: &Version) -> bool {
23 let version_req = VersionReq::from_str("=0.0.6").unwrap();
24
25 version_req.matches(other)
26 }
27