chore: addition to previous commit

This commit is contained in:
Lucas Nogueira 2022-12-15 18:28:44 -03:00
parent 015020760a
commit d7ffa7f95e
No known key found for this signature in database
GPG Key ID: FFEA6C72E73482F1
4 changed files with 4 additions and 4 deletions

View File

@ -17,7 +17,7 @@ pub fn main() -> Result<(), Box<dyn Error>> {
crate_dir.join("schema.json"), crate_dir.join("schema.json"),
crate_dir.join("../../tooling/cli/schema.json"), crate_dir.join("../../tooling/cli/schema.json"),
] { ] {
let mut schema_file = BufWriter::new(File::create(&file)?); let mut schema_file = BufWriter::new(File::create(file)?);
write!(schema_file, "{schema_str}")?; write!(schema_file, "{schema_str}")?;
} }

View File

@ -72,7 +72,7 @@ fn copy_resources(resources: ResourcePaths<'_>, path: &Path) -> Result<()> {
let src = src?; let src = src?;
println!("cargo:rerun-if-changed={}", src.display()); println!("cargo:rerun-if-changed={}", src.display());
let dest = path.join(resource_relpath(&src)); let dest = path.join(resource_relpath(&src));
copy_file(&src, &dest)?; copy_file(&src, dest)?;
} }
Ok(()) Ok(())
} }

View File

@ -245,7 +245,7 @@ impl<'a, R: Read + Seek> Extract<'a, R> {
// such as: 爱交易.app/, that does not work as expected. // such as: 爱交易.app/, that does not work as expected.
// Here we require the file name must be a valid UTF-8. // Here we require the file name must be a valid UTF-8.
let file_name = String::from_utf8(file.name_raw().to_vec())?; let file_name = String::from_utf8(file.name_raw().to_vec())?;
let out_path = into_dir.join(&file_name); let out_path = into_dir.join(file_name);
if file.is_dir() { if file.is_dir() {
fs::create_dir_all(&out_path)?; fs::create_dir_all(&out_path)?;
} else { } else {

View File

@ -661,7 +661,7 @@ impl Response {
let data = match self.0 { let data = match self.0 {
ResponseType::Json => self.1.json()?, ResponseType::Json => self.1.json()?,
ResponseType::Text => Value::String(self.1.text()?), ResponseType::Text => Value::String(self.1.text()?),
ResponseType::Binary => serde_json::to_value(&self.1.bytes()?)?, ResponseType::Binary => serde_json::to_value(self.1.bytes()?)?,
}; };
Ok(ResponseData { Ok(ResponseData {