Make suggested changes

This commit is contained in:
Richard Dodd 2018-09-30 15:17:47 +01:00
parent f1073dca04
commit 80765eb453
2 changed files with 5 additions and 5 deletions

View File

@ -6,7 +6,7 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
//! A serde ast, parsed from the syn ast and ready to generate rust code. //! A Serde ast, parsed from the Syn ast and ready to generate Rust code.
use internals::attr; use internals::attr;
use internals::check; use internals::check;
@ -19,7 +19,7 @@ use syn::punctuated::Punctuated;
pub struct Container<'a> { pub struct Container<'a> {
/// The struct or enum name (without generics). /// The struct or enum name (without generics).
pub ident: syn::Ident, pub ident: syn::Ident,
/// Attributes on the structure, parsed for serde. /// Attributes on the structure, parsed for Serde.
pub attrs: attr::Container, pub attrs: attr::Container,
/// The contents of the struct or enum. /// The contents of the struct or enum.
pub data: Data<'a>, pub data: Data<'a>,
@ -64,7 +64,7 @@ pub enum Style {
} }
impl<'a> Container<'a> { impl<'a> Container<'a> {
/// Convert the raw syn ast into a parsed container object, collecting errors in `cx`. /// Convert the raw Syn ast into a parsed container object, collecting errors in `cx`.
pub fn from_ast(cx: &Ctxt, item: &'a syn::DeriveInput, derive: Derive) -> Container<'a> { pub fn from_ast(cx: &Ctxt, item: &'a syn::DeriveInput, derive: Derive) -> Container<'a> {
let mut attrs = attr::Container::from_ast(cx, item); let mut attrs = attr::Container::from_ast(cx, item);

View File

@ -6,8 +6,8 @@
// option. This file may not be copied, modified, or distributed // option. This file may not be copied, modified, or distributed
// except according to those terms. // except according to those terms.
//! Utility code to assist converting the case of the source (e.g. `my-field`, `MY_FIELD`) to the //! Code to convert the Rust-styled field/variant (e.g. `my_field`, `MyType`) to the
//! rust-styled field/variant (e.g. `my_field`, `MyType`). //! case of the source (e.g. `my-field`, `MY_FIELD`).
// See https://users.rust-lang.org/t/psa-dealing-with-warning-unused-import-std-ascii-asciiext-in-today-s-nightly/13726 // See https://users.rust-lang.org/t/psa-dealing-with-warning-unused-import-std-ascii-asciiext-in-today-s-nightly/13726
#[allow(deprecated, unused_imports)] #[allow(deprecated, unused_imports)]