Skip to content

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
Signed-off-by: Audrow Nash <audrow@intrinsic.ai>
  • Loading branch information
audrow committed Nov 21, 2023
1 parent 5d40187 commit 02b694a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 11 deletions.
2 changes: 1 addition & 1 deletion rmf_site_editor/src/workcell/save.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ use bevy::ecs::system::SystemState;
use bevy::prelude::*;
use std::path::{Path as SysPath, PathBuf};

use crate::workcell::urdf_package_exporter::{generate_package, PackageContext, Person};
use crate::site::{CollisionMeshMarker, Pending, VisualMeshMarker};
use crate::workcell::urdf_package_exporter::{generate_package, PackageContext, Person};
use crate::ExportFormat;

use thiserror::Error as ThisError;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,11 +166,9 @@ fn copy_files(paths: &Vec<String>, output_directory: &Path) -> Result<(), Box<dy

fn get_path_to_asset_file(asset_source: &AssetSource) -> Result<String, Box<dyn Error>> {
match asset_source {
AssetSource::Package(path) => Ok((*urdf_rs::utils::expand_package_path(
&path,
None,
))
.to_owned()),
AssetSource::Package(path) => {
Ok((*urdf_rs::utils::expand_package_path(&path, None)).to_owned())
}
AssetSource::Remote(asset_name) => {
let mut asset_path = cache_path();
asset_path.push(PathBuf::from(&asset_name));
Expand All @@ -183,12 +181,16 @@ fn get_path_to_asset_file(asset_source: &AssetSource) -> Result<String, Box<dyn
.to_string())
}
AssetSource::Local(path) => Ok(path.clone()),
AssetSource::Search(_) | AssetSource::OSMTile {zoom: _, latitude: _, longitude: _} | AssetSource::Bundled(_) => {
Err(IoError::new(
IoErrorKind::Unsupported,
"Not a supported asset type for exporting a workcell to a package",
))?
AssetSource::Search(_)
| AssetSource::OSMTile {
zoom: _,
latitude: _,
longitude: _,
}
| AssetSource::Bundled(_) => Err(IoError::new(
IoErrorKind::Unsupported,
"Not a supported asset type for exporting a workcell to a package",
))?,
}
}

Expand Down

0 comments on commit 02b694a

Please sign in to comment.