Skip to content

Commit

Permalink
aaa
Browse files Browse the repository at this point in the history
  • Loading branch information
Emilgardis committed Jun 25, 2022
1 parent 2660e99 commit 68e91a1
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 13 deletions.
9 changes: 4 additions & 5 deletions src/bin/commands/containers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,9 @@ use atty::Stream;
use clap::{Args, Subcommand};
use cross::{
docker::{self, ImageArchitecture},
rustc::{QualifiedToolchain, Toolchain},
rustc::QualifiedToolchain,
CommandExt,
};
use eyre::Context;

#[derive(Args, Debug)]
pub struct ListVolumes {
Expand Down Expand Up @@ -301,7 +300,7 @@ pub fn create_persistent_volume(
..
}: CreateVolume,
engine: &docker::Engine,
channel: Option<&str>,
_channel: Option<&str>,
) -> cross::Result<()> {
// we only need a triple that needs docker: the actual target doesn't matter.
let target = cross::Target::BuiltIn {
Expand Down Expand Up @@ -380,13 +379,13 @@ pub fn create_persistent_volume(

pub fn remove_persistent_volume(
RemoveVolume {
target,
target: _,
docker_in_docker,
verbose,
..
}: RemoveVolume,
engine: &docker::Engine,
channel: Option<&str>,
_channel: Option<&str>,
) -> cross::Result<()> {
let toolchain = QualifiedToolchain::default(verbose)?;
// TODO: channel
Expand Down
2 changes: 1 addition & 1 deletion src/docker/local.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ pub(crate) fn run(
}
let mut image_name = image.name.clone();
if needs_custom_image(target, config) {
image_name = custom_image_build(target, image, config, metadata, dirs, &engine, verbose)
image_name = custom_image_build(target, image, config, metadata, dirs, engine, verbose)
.wrap_err("when building custom image")?
}

Expand Down
4 changes: 2 additions & 2 deletions src/docker/shared.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@ use std::{env, fs};
use super::custom::Dockerfile;
use super::engine::*;
use super::image::PossibleImage;
use super::{engine::*, Image, ImageArchitecture};
use super::{Image, ImageArchitecture};
use crate::cargo::{cargo_metadata_with_args, CargoMetadata};
use crate::config::Config;
use crate::extensions::{CommandExt, SafeCommand};
use crate::file::{self, write_file, PathExt, ToUtf8};
use crate::id;
use crate::rustc::{self, QualifiedToolchain, VersionMetaExt};
use crate::rustc::QualifiedToolchain;
use crate::Target;
use crate::{errors::*, TargetTriple};

Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -420,7 +420,7 @@ pub fn run(args: Args, target_list: TargetList, verbose: bool) -> Result<Option<

// Grab the current toolchain, this might be the one we mount in the image later
let default_toolchain = QualifiedToolchain::default(verbose)?;
let sysroot = default_toolchain.get_sysroot();
let _sysroot = default_toolchain.get_sysroot();

// `cross +channel`, where channel can be `+channel[-YYYY-MM-DD]`
let mut toolchain = if let Some(channel) = args.channel {
Expand Down
4 changes: 2 additions & 2 deletions src/rustc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ use rustc_version::{Version, VersionMeta};
use serde::Deserialize;

use crate::docker::ImageArchitecture;
use crate::errors::*;
use crate::extensions::{env_program, CommandExt};
use crate::{errors::*, Target};
use crate::{rustup, TargetTriple};
use crate::TargetTriple;

#[derive(Debug)]
pub struct TargetList {
Expand Down
3 changes: 2 additions & 1 deletion src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,8 @@ release: {version}
&QualifiedToolchain::new(
"xxxx",
&None,
&ImageArchitecture::from_target(TargetTriple::X86_64UnknownLinuxGnu)
&ImageArchitecture::from_target(TargetTriple::X86_64UnknownLinuxGnu),
Path::new("/toolchains/xxxx-x86_64-unknown-linux-gnu"),
),
&target_meta.0,
&target_meta.1
Expand Down
2 changes: 1 addition & 1 deletion xtask/src/build_docker_image.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ use std::path::Path;

use clap::Args;
use color_eyre::Section;
use cross::docker::ImageArchitecture;
use cross::{docker, CommandExt, ToUtf8};
use cross::{docker::ImageArchitecture, CommandExt};
use std::fmt::Write;

#[derive(Args, Debug)]
Expand Down

0 comments on commit 68e91a1

Please sign in to comment.