Skip to content

Commit

Permalink
Fix unused lints
Browse files Browse the repository at this point in the history
  • Loading branch information
Kampfkarren committed Jul 6, 2024
1 parent 472ba69 commit bd4b410
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 22 deletions.
25 changes: 5 additions & 20 deletions selene/src/roblox/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,20 +65,13 @@ pub enum ApiMember {
}

#[derive(Deserialize)]
#[serde(rename_all = "PascalCase")]
pub struct ApiParameter {
pub default: Option<String>,
#[serde(rename = "Type")]
pub parameter_type: ApiValueType,
}
pub struct ApiParameter {}

#[derive(Debug)]
pub enum ApiValueType {
Class { name: String },
DataType { value: ApiDataType },
Group { value: ApiGroupType },
Primitive { value: ApiPrimitiveType },
Other { name: String },
Other,
}

impl<'de> Deserialize<'de> for ApiValueType {
Expand Down Expand Up @@ -118,15 +111,7 @@ impl<'de> Visitor<'de> for ApiValueTypeVisitor {
value: ApiDataType::deserialize(name.into_deserializer())?,
},

"Group" => ApiValueType::Group {
value: ApiGroupType::deserialize(name.into_deserializer())?,
},

"Primitive" => ApiValueType::Primitive {
value: ApiPrimitiveType::deserialize(name.into_deserializer())?,
},

_ => ApiValueType::Other { name },
_ => ApiValueType::Other,
})
}
}
Expand Down Expand Up @@ -167,7 +152,7 @@ pub enum ApiDataType {
UDim,
UDim2,

Other(String),
Other,
}

impl ApiDataType {
Expand Down Expand Up @@ -198,7 +183,7 @@ impl<'de> Deserialize<'de> for ApiDataType {
"UDim2" => ApiDataType::UDim2,
"Vector2" => ApiDataType::Vector2,
"Vector3" => ApiDataType::Vector3,
_ => ApiDataType::Other(string),
_ => ApiDataType::Other,
})
}
}
Expand Down
4 changes: 2 additions & 2 deletions selene/src/standard_library.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@ pub enum StandardLibraryError {
impl Display for StandardLibraryError {
fn fmt(&self, formatter: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
match self {
StandardLibraryError::BaseStd { name, .. } => {
StandardLibraryError::BaseStd { name, source } => {
write!(
formatter,
"failed to collect base standard library `{name}`",
"failed to collect base standard library `{name}`: {source}",
)
}

Expand Down

0 comments on commit bd4b410

Please sign in to comment.