1
Fork 0

Replace every String in Target(Options) with Cow<'static, str>

This commit is contained in:
Loïc BRANSTETT 2022-03-22 11:43:05 +01:00
parent 15a242a432
commit ccff48f97b
223 changed files with 1252 additions and 1243 deletions

View file

@ -170,6 +170,7 @@ use self::JsonEvent::*;
use self::ParserError::*;
use self::ParserState::*;
use std::borrow::Cow;
use std::collections::{BTreeMap, HashMap};
use std::mem::swap;
use std::num::FpCategory as Fp;
@ -2196,6 +2197,12 @@ impl ToJson for string::String {
}
}
impl<'a> ToJson for Cow<'a, str> {
fn to_json(&self) -> Json {
Json::String(self.to_string())
}
}
macro_rules! tuple_impl {
// use variables to indicate the arity of the tuple
($($tyvar:ident),* ) => {