Replace every String
in Target(Options) with Cow<'static, str>
This commit is contained in:
parent
15a242a432
commit
ccff48f97b
223 changed files with 1252 additions and 1243 deletions
|
@ -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),* ) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue