update tar to have different names for errors and pub them

This commit is contained in:
Able 2022-12-05 00:43:08 -06:00
parent d16bc14ffc
commit 4844fe8b07
3 changed files with 7 additions and 9 deletions

2
Cargo.lock generated
View file

@ -248,7 +248,7 @@ dependencies = [
[[package]] [[package]]
name = "tar" name = "tar"
version = "0.1.0" version = "0.1.1"
dependencies = [ dependencies = [
"versioning", "versioning",
] ]

View file

@ -1,6 +1,6 @@
[package] [package]
name = "tar" name = "tar"
version = "0.1.0" version = "0.1.1"
edition = "2021" edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

View file

@ -1,9 +1,7 @@
#![no_std] #![no_std]
pub const VERSION: versioning::Version = versioning::Version {
major: 0, use versioning::Version;
minor: 1, pub const VERSION: Version = Version::new(0, 1, 1);
patch: 0,
};
pub struct Header { pub struct Header {
pub filename: [char; 100], pub filename: [char; 100],
@ -93,7 +91,7 @@ fn from2tar() {
// assert_eq!(array) // assert_eq!(array)
} }
enum Error { pub enum TarError {
InvalidChecksum, InvalidChecksum,
InvalidFileData, InvalidFileData,
InvalidTarFormat, InvalidTarFormat,
@ -104,7 +102,7 @@ enum Error {
} }
#[derive(Debug)] #[derive(Debug)]
enum FileType { pub enum FileType {
Directory, Directory,
Regular, Regular,
Other(char), Other(char),