computer: part 1

This commit is contained in:
nym21
2025-03-19 12:01:54 +01:00
parent ad761e388d
commit 29c10f8854
39 changed files with 1567 additions and 570 deletions
+1 -6
View File
@@ -1,9 +1,4 @@
use std::{
fs,
io::{self},
ops::Deref,
path::Path,
};
use std::{fs, io, ops::Deref, path::Path};
use crate::{Error, Result};
+4 -2
View File
@@ -9,7 +9,9 @@ use zerocopy::{FromBytes, Immutable, IntoBytes, KnownLayout};
use crate::{Error, Result};
#[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, FromBytes, IntoBytes, Immutable, KnownLayout)]
#[derive(
Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, FromBytes, IntoBytes, Immutable, KnownLayout,
)]
pub struct Version(u32);
impl Version {
@@ -54,7 +56,7 @@ impl TryFrom<&Path> for Version {
}
impl Add<Version> for Version {
type Output = Version;
type Output = Self;
fn add(self, rhs: Version) -> Self::Output {
Self(self.0 + rhs.0)
}