recover: recover Malachite v3.0.0

main v3.0.0
Michal S 2 years ago
parent 6eb8d1cd6c
commit e8ecb3ae76
No known key found for this signature in database
GPG Key ID: 52F8801FC912EB4F

@ -74,7 +74,7 @@ impl Build {
async fn podman_build(&self) -> AppResult<()> { async fn podman_build(&self) -> AppResult<()> {
let uid = uid(); let uid = uid();
let podman = Podman::new(format!("unix:///var/run/user/{}/podman/podman.sock", uid))?; let podman = Podman::new(format!("unix:///var/run/user/{uid}/podman/podman.sock"))?;
let image = self.kind.image().unwrap(); let image = self.kind.image().unwrap();
let buildfile = fs::read_to_string(".mlc/Buildfile")?; let buildfile = fs::read_to_string(".mlc/Buildfile")?;
@ -114,11 +114,11 @@ impl Build {
println!("{}", chunk.stream); println!("{}", chunk.stream);
let _ = log_file.write(chunk.stream.as_bytes())?; let _ = log_file.write(chunk.stream.as_bytes())?;
} }
Err(e) => eprintln!("{}", e), Err(e) => eprintln!("{e}"),
} }
} }
} }
Err(e) => eprintln!("{}", e), Err(e) => eprintln!("{e}"),
}; };
podman podman
@ -177,7 +177,7 @@ impl Build {
&CopyOptions::new(), &CopyOptions::new(),
)?; )?;
} }
Err(e) => eprintln!("{}", e), Err(e) => eprintln!("{e}"),
} }
} }

@ -166,7 +166,7 @@ impl Config {
std::fs::write( std::fs::write(
".mlc/mlc.lock", ".mlc/mlc.lock",
format!("[lockfile]\nversion = '{}'\n\n[remote]\n", LOCKFILE_VERSION), format!("[lockfile]\nversion = '{LOCKFILE_VERSION}'\n\n[remote]\n"),
)?; )?;
std::fs::write(".mlc/conf.d/.gitkeep", "\n")?; std::fs::write(".mlc/conf.d/.gitkeep", "\n")?;
std::fs::write(".mlc/store/.gitkeep", "\n")?; std::fs::write(".mlc/store/.gitkeep", "\n")?;

@ -139,7 +139,7 @@ impl PacmanRepository {
pub async fn podman_generate(&self) -> AppResult<()> { pub async fn podman_generate(&self) -> AppResult<()> {
let uid = uid(); let uid = uid();
let podman = Podman::new(format!("unix:///run/user/{}/podman/podman.sock", uid))?; let podman = Podman::new(format!("unix:///run/user/{uid}/podman/podman.sock"))?;
let image = self.kind.image().unwrap(); let image = self.kind.image().unwrap();
let generatefile = fs::read_to_string(".mlc/Generatefile")?; let generatefile = fs::read_to_string(".mlc/Generatefile")?;
@ -171,12 +171,12 @@ impl PacmanRepository {
Ok(mut generate_stream) => { Ok(mut generate_stream) => {
while let Some(chunk) = generate_stream.next().await { while let Some(chunk) = generate_stream.next().await {
match chunk { match chunk {
Ok(chunk) => println!("{:?}", chunk), Ok(chunk) => println!("{chunk:?}"),
Err(e) => eprintln!("{}", e), Err(e) => eprintln!("{e}"),
} }
} }
} }
Err(e) => eprintln!("{}", e), Err(e) => eprintln!("{e}"),
}; };
podman podman

@ -23,9 +23,9 @@ pub enum GitStatus {
impl GitStatus { impl GitStatus {
fn color(&self) -> String { fn color(&self) -> String {
match self { match self {
Self::Clean => format!("{}{}", BOLD, CLEAN), Self::Clean => format!("{BOLD}{CLEAN}"),
Self::Dirty => format!("{}{}", BOLD, DIRTY), Self::Dirty => format!("{BOLD}{DIRTY}"),
Self::Unknown => format!("{}{}", BOLD, UNKNOWN), Self::Unknown => format!("{BOLD}{UNKNOWN}"),
} }
} }
} }

@ -227,10 +227,9 @@ fn cmd_info() -> AppResult<()> {
let mut table = tabled::Table::new(overview); let mut table = tabled::Table::new(overview);
table.with(tabled::Style::rounded()); table.with(tabled::Style::rounded());
println!("{}", table); println!("{table}");
println!( println!(
" {}Key:{} {}Clean {}Unknown {}Dirty{}", " {BOLD}Key:{RESET} {CLEAN}Clean {UNKNOWN}Unknown {DIRTY}Dirty{RESET}"
BOLD, RESET, CLEAN, UNKNOWN, DIRTY, RESET
); );
Ok(()) Ok(())

Loading…
Cancel
Save