Co-authored-by: Christian Legnitto <LegNeato@users.noreply.github.com>
This commit is contained in:
parent
61fbd6ef7f
commit
0de631741e
5 changed files with 7 additions and 6 deletions
|
@ -46,6 +46,7 @@ graphql-parser = { version = "0.3", optional = true }
|
|||
indexmap = { version = "1.0", features = ["serde-1"] }
|
||||
serde = { version = "1.0.8", features = ["derive"], default-features = false }
|
||||
serde_json = { version = "1.0.2", default-features = false, optional = true }
|
||||
smartstring = "0.2.6"
|
||||
static_assertions = "1.1"
|
||||
url = { version = "2.0", optional = true }
|
||||
uuid = { version = "0.8", default-features = false, optional = true }
|
||||
|
|
|
@ -1158,7 +1158,7 @@ where
|
|||
T: GraphQLType<S> + ?Sized,
|
||||
{
|
||||
Field {
|
||||
name: name.to_owned(),
|
||||
name: smartstring::SmartString::from(name),
|
||||
description: None,
|
||||
arguments: None,
|
||||
field_type: self.get_type::<T>(info),
|
||||
|
@ -1176,7 +1176,7 @@ where
|
|||
I: GraphQLType<S>,
|
||||
{
|
||||
Field {
|
||||
name: name.to_owned(),
|
||||
name: smartstring::SmartString::from(name),
|
||||
description: None,
|
||||
arguments: None,
|
||||
field_type: self.get_type::<I>(info),
|
||||
|
|
|
@ -297,7 +297,7 @@ impl<'a> Lexer<'a> {
|
|||
}
|
||||
|
||||
// Make sure we are on a valid char boundary.
|
||||
let escape = &self
|
||||
let escape = self
|
||||
.source
|
||||
.get(start_idx..=end_idx)
|
||||
.ok_or_else(|| Spanning::zero_width(&self.position, LexerError::UnterminatedString))?;
|
||||
|
|
|
@ -158,7 +158,7 @@ pub enum MetaType<'a, S = DefaultScalarValue> {
|
|||
#[derive(Debug, Clone)]
|
||||
pub struct Field<'a, S> {
|
||||
#[doc(hidden)]
|
||||
pub name: String,
|
||||
pub name: smartstring::alias::String,
|
||||
#[doc(hidden)]
|
||||
pub description: Option<String>,
|
||||
#[doc(hidden)]
|
||||
|
|
|
@ -318,8 +318,8 @@ impl<'a, S> Field<'a, S>
|
|||
where
|
||||
S: crate::ScalarValue + 'a,
|
||||
{
|
||||
fn name(&self) -> &String {
|
||||
&self.name
|
||||
fn name(&self) -> String {
|
||||
self.name.clone().into()
|
||||
}
|
||||
|
||||
fn description(&self) -> &Option<String> {
|
||||
|
|
Loading…
Reference in a new issue