Compare commits

..

No commits in common. "efd44e16e2ae8454b6c64b287c9333aeb566a66f" and "b40178ede24159251aabb5100afa9d223acd5467" have entirely different histories.

4 changed files with 8 additions and 20 deletions

View File

@ -4,10 +4,8 @@ version = "0.1.0"
edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[features]
serde = ["dep:serde"]
[dependencies]
chrono = { version = "0.4", features = ["serde"] }
epoch = { git = "https://git.hitchhiker-linux.org/jeang3nie/epoch-rs.git", features = ["serde"] }
serde = { version = "1.0", features = ["derive"], optional = true }
serde = { version = "1.0", features = ["derive"] }

View File

@ -1,13 +1,10 @@
#[cfg(feature = "serde")]
use serde::{Deserialize, Serialize};
use {
crate::error::Error,
serde::{Deserialize, Serialize},
std::{fmt, str},
};
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
#[cfg_attr(feature = "serde", derive(Deserialize, Serialize))]
#[derive(Clone, Copy, Debug, Deserialize, Serialize, PartialEq, Eq)]
/// Represents the processor architecture the software is compiled for
pub enum Arch {
Any,

View File

@ -1,14 +1,11 @@
#[cfg(feature = "serde")]
use serde::{Deserialize, Serialize};
use {
crate::{error::Error, MAX_U12},
epoch::DateTime,
serde::{Deserialize, Serialize},
std::{cmp, convert::Into, fmt, num::NonZeroU16, str},
};
#[derive(Clone, Copy, Debug)]
#[cfg_attr(feature = "serde", derive(Deserialize, Serialize))]
#[derive(Clone, Copy, Debug, Deserialize, Serialize)]
/// A specification for non-production releases
pub enum PreRelease {
Alpha(Option<NonZeroU16>),

View File

@ -1,13 +1,10 @@
#[cfg(feature = "serde")]
use serde::{Deserialize, Serialize};
use {
crate::{arch::Arch, error::Error, prerelease::PreRelease, MAX_U12},
serde::{Deserialize, Serialize},
std::{cmp, fmt, str},
};
#[derive(Clone, Copy, Debug)]
#[cfg_attr(feature = "serde", derive(Deserialize, Serialize))]
#[derive(Clone, Copy, Debug, Deserialize, Serialize)]
pub enum Kind {
Simple {
major: u16,
@ -29,8 +26,7 @@ pub enum Kind {
},
}
#[derive(Clone, Copy, Debug)]
#[cfg_attr(feature = "serde", derive(Deserialize, Serialize))]
#[derive(Clone, Copy, Debug, Deserialize, Serialize)]
pub struct Version {
pub kind: Kind,
pub pre: PreRelease,