Skip to content

Commit

Permalink
build: fix fmt and correct unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcAntoine-Arnaud committed Jan 4, 2024
1 parent 0f3cecb commit c542a1d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion xml_schema_derive/src/xsd/element.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ impl Element {
} else {
name
};

let attribute_name = Ident::new(&name, Span::call_site());
let yaserde_rename = &self.name;

Expand Down
6 changes: 3 additions & 3 deletions xml_schema_derive/src/xsd/extension.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ impl Implementation for Extension {
.map(|attribute| attribute.implement(namespace_definition, prefix, context))
.collect();

let inner_attribute = if format!("{rust_type}") == "String" {
let inner_attribute = if format!("{rust_type}") == "String" {
quote!(#[yaserde(text)])
} else {
TokenStream::new()
Expand Down Expand Up @@ -102,7 +102,7 @@ mod tests {
let expected = TokenStream::from_str(
r#"
#[yaserde(text)]
pub content: String,
pub base: String,
"#,
)
.unwrap();
Expand Down Expand Up @@ -145,7 +145,7 @@ mod tests {
let expected = TokenStream::from_str(
r#"
#[yaserde(text)]
pub content: String,
pub base: String,
#[yaserde(attribute)]
pub attribute_1: String,
#[yaserde(attribute)]
Expand Down
3 changes: 2 additions & 1 deletion xml_schema_derive/src/xsd/schema.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
use crate::xsd::{

use crate::xsd::{
attribute, attribute_group, complex_type, element, group, import, qualification, simple_type,
Implementation, XsdContext,
};
Expand Down

0 comments on commit c542a1d

Please sign in to comment.