fmt + fixed #4

main
michal 3 years ago
parent 90011992c1
commit 8eeb2aa841

@ -12,9 +12,9 @@ use crate::workspace::read_cfg;
static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc;
mod internal;
mod operations;
mod repository;
mod workspace;
mod operations;
fn main() {
extern "C" {
@ -137,11 +137,11 @@ fn main() {
}
if let true = matches.is_present("reinit") {
operations::reinit();
operations::reinit();
}
if let true = matches.is_present("build") {
operations::build(&matches);
operations::build(&matches);
}
if let true = matches.is_present("pull") {
@ -211,4 +211,4 @@ fn main() {
if let true = matches.is_present("config") {
operations::config();
}
}
}

@ -1,5 +1,6 @@
use clap::ArgMatches;
use crate::repository::generate;
use crate::{crash, repository, workspace};
use clap::ArgMatches;
pub fn build(matches: &ArgMatches) {
let config = workspace::read_cfg();
@ -15,7 +16,6 @@ pub fn build(matches: &ArgMatches) {
.values_of_lossy("exclude")
.unwrap_or_default();
for pkg in &exclude {
packages.retain(|x| &*x != pkg);
}
@ -57,6 +57,7 @@ pub fn build(matches: &ArgMatches) {
for pkg in repos {
repository::build(pkg);
}
generate();
}
if matches
@ -66,4 +67,4 @@ pub fn build(matches: &ArgMatches) {
{
repository::generate();
}
}
}

@ -1,3 +1,8 @@
use crate::create_config;
use std::env;
use std::path::Path;
use std::process::Command;
pub fn config() {
if !Path::exists("mlc.toml".as_ref()) {
create_config();
@ -9,4 +14,4 @@ pub fn config() {
.unwrap()
.wait()
.unwrap();
}
}

@ -1,5 +1,5 @@
use std::process::Command;
use crate::{crash, info, workspace};
use std::process::Command;
pub fn reinit() {
let config = workspace::read_cfg();
@ -79,4 +79,4 @@ pub fn init() {
} else {
crash("Invalid mode in mlc.toml".to_string(), 1);
}
}
}

@ -1,9 +1,9 @@
use clap::ArgMatches;
mod init;
mod build;
mod pull;
mod config;
mod init;
mod pull;
pub fn reinit() {
init::reinit();
@ -23,4 +23,4 @@ pub fn pull(matches: &ArgMatches) {
pub fn config() {
config::config();
}
}

@ -1,7 +1,7 @@
use crate::{info, workspace};
use clap::ArgMatches;
use std::env;
use std::process::Command;
use clap::ArgMatches;
use crate::{info, workspace};
pub fn pull(matches: &ArgMatches) {
let packages: Vec<String> = matches
@ -46,4 +46,4 @@ pub fn pull(matches: &ArgMatches) {
env::set_current_dir(&cdir).unwrap();
}
}
}
}

Loading…
Cancel
Save