mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-28 21:05:08 +00:00
refactor: Extract ruff_wasm
(#3401)
This commit is contained in:
parent
a7f3532395
commit
229f1c34cb
14 changed files with 193 additions and 181 deletions
|
@ -66,12 +66,12 @@ pub fn expand<'a>(
|
|||
}
|
||||
|
||||
impl std::str::FromStr for #prefix_ident {
|
||||
type Err = FromCodeError;
|
||||
type Err = crate::registry::FromCodeError;
|
||||
|
||||
fn from_str(code: &str) -> Result<Self, Self::Err> {
|
||||
match code {
|
||||
#(#attributes #variant_strs => Ok(Self::#variant_idents),)*
|
||||
_ => Err(FromCodeError::Unknown)
|
||||
_ => Err(crate::registry::FromCodeError::Unknown)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue