forked from 1b-agent/opencadstudio-upstream
cargo fmt
This commit is contained in:
1 parent
468cbde5e1
commit
ca07268c7c
204 files changed
+13997
-5525
No files matched your search
@@ -22,10 +22,7 @@ pub fn tool() -> ToolDef {
|
||||
/// extracted into model space.
|
||||
///
|
||||
/// Returns `Err` if the block is not found or has no entities.
|
||||
pub fn extract_block_to_doc(
|
||||
src: &CadDocument,
|
||||
block_name: &str,
|
||||
) -> Result<CadDocument, String> {
|
||||
pub fn extract_block_to_doc(src: &CadDocument, block_name: &str) -> Result<CadDocument, String> {
|
||||
let br = src
|
||||
.block_records
|
||||
.get(block_name)
|
||||
@@ -62,7 +59,9 @@ pub fn extract_block_to_doc(
|
||||
}
|
||||
|
||||
if out.entities().count() == 0 {
|
||||
return Err(format!("Block \"{block_name}\" produced no exportable entities."));
|
||||
return Err(format!(
|
||||
"Block \"{block_name}\" produced no exportable entities."
|
||||
));
|
||||
}
|
||||
|
||||
Ok(out)
|
||||
|
||||
Reference in new issue
Block a user