mirror of
https://github.com/pezkuwichain/serde.git
synced 2026-06-13 06:41:03 +00:00
Merge pull request #2394 from dtolnay/emptybound
Eliminate special case on empty string passed to bound=""
This commit is contained in:
@@ -1626,9 +1626,6 @@ fn parse_lit_into_where(
|
|||||||
lit: &syn::Lit,
|
lit: &syn::Lit,
|
||||||
) -> Result<Vec<syn::WherePredicate>, ()> {
|
) -> Result<Vec<syn::WherePredicate>, ()> {
|
||||||
let string = get_lit_str2(cx, attr_name, meta_item_name, lit)?;
|
let string = get_lit_str2(cx, attr_name, meta_item_name, lit)?;
|
||||||
if string.value().is_empty() {
|
|
||||||
return Ok(Vec::new());
|
|
||||||
}
|
|
||||||
|
|
||||||
let where_string = syn::LitStr::new(&format!("where {}", string.value()), string.span());
|
let where_string = syn::LitStr::new(&format!("where {}", string.value()), string.span());
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user