Skip to content

Commit

Permalink
use i64 instead of i32 to avoid size issues
Browse files Browse the repository at this point in the history
  • Loading branch information
mt-caret authored and gngeorgiev committed Nov 18, 2021
1 parent 31ae4cb commit 3aed23b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/version.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ use serde::{Deserialize, Serialize};
#[derive(Default, Clone, Debug)]
#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
pub struct Version {
pub major: i32,
pub minor: i32,
pub patch: i32,
pub major: i64,
pub minor: i64,
pub patch: i64,
pub prerelease: Option<Vec<String>>,

any: bool,
Expand Down Expand Up @@ -82,7 +82,7 @@ impl<'p> Version {
}

/// Constructs a version from its already parsed parts, e.g. `Version::from_parts(1, 2, 3, None)`.
pub fn from_parts(major: i32, minor: i32, patch: i32, prerelease: Option<String>) -> Self {
pub fn from_parts(major: i64, minor: i64, patch: i64, prerelease: Option<String>) -> Self {
let prerelease = match prerelease {
Some(pre) => {
let split: Vec<&str> = pre.split(".").collect();
Expand Down

0 comments on commit 3aed23b

Please sign in to comment.