mirror of
https://github.com/saymrwulf/xous-core.git
synced 2026-11-18 08:52:45 +00:00
xtask: rename BuildStream's to_str to as_str
This naming more closely reflects the ownership semantic
This commit is contained in:
parent
e7da909372
commit
495c342ab0
1 changed files with 5 additions and 5 deletions
|
|
@ -15,7 +15,7 @@ pub(crate) enum BuildStream {
|
||||||
Release,
|
Release,
|
||||||
}
|
}
|
||||||
impl BuildStream {
|
impl BuildStream {
|
||||||
pub fn to_str(&self) -> &str {
|
pub fn as_str(&self) -> &str {
|
||||||
match self {
|
match self {
|
||||||
BuildStream::Debug => "debug",
|
BuildStream::Debug => "debug",
|
||||||
BuildStream::Release => "release",
|
BuildStream::Release => "release",
|
||||||
|
|
@ -438,7 +438,7 @@ impl Builder {
|
||||||
Some(t) => format!("{}/", t),
|
Some(t) => format!("{}/", t),
|
||||||
None => "".to_string(),
|
None => "".to_string(),
|
||||||
},
|
},
|
||||||
stream.to_str(),
|
stream.as_str(),
|
||||||
);
|
);
|
||||||
remote_args.push(&output_root);
|
remote_args.push(&output_root);
|
||||||
|
|
||||||
|
|
@ -803,7 +803,7 @@ impl Builder {
|
||||||
let svd_spec_path = format!(
|
let svd_spec_path = format!(
|
||||||
"target/{}/{}/build/SVD_PATH",
|
"target/{}/{}/build/SVD_PATH",
|
||||||
self.target.as_ref().expect("target"),
|
self.target.as_ref().expect("target"),
|
||||||
self.stream.to_str()
|
self.stream.as_str()
|
||||||
);
|
);
|
||||||
let mut svd_spec_file = OpenOptions::new().read(true).open(svd_spec_path)?;
|
let mut svd_spec_file = OpenOptions::new().read(true).open(svd_spec_path)?;
|
||||||
let mut svd_path_str = String::new();
|
let mut svd_path_str = String::new();
|
||||||
|
|
@ -910,7 +910,7 @@ impl Builder {
|
||||||
inif: &[String],
|
inif: &[String],
|
||||||
memory_spec: Vec<String>,
|
memory_spec: Vec<String>,
|
||||||
) -> Result<PathBuf, DynError> {
|
) -> Result<PathBuf, DynError> {
|
||||||
let stream = self.stream.to_str();
|
let stream = self.stream.as_str();
|
||||||
let mut args = vec!["run", "--package", "tools", "--bin", "create-image", "--"];
|
let mut args = vec!["run", "--package", "tools", "--bin", "create-image", "--"];
|
||||||
|
|
||||||
let mut output_file = PathBuf::new();
|
let mut output_file = PathBuf::new();
|
||||||
|
|
@ -964,7 +964,7 @@ impl Builder {
|
||||||
let exec_name = format!(
|
let exec_name = format!(
|
||||||
"target/{}/{}/{}",
|
"target/{}/{}/{}",
|
||||||
self.target.as_ref().expect("target"),
|
self.target.as_ref().expect("target"),
|
||||||
self.stream.to_str(),
|
self.stream.as_str(),
|
||||||
name
|
name
|
||||||
);
|
);
|
||||||
println!("Fetching {} executable from build server...", name);
|
println!("Fetching {} executable from build server...", name);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue