Make suggested changes
This commit is contained in:
parent
f1073dca04
commit
80765eb453
@ -6,7 +6,7 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// 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::check;
|
||||
@ -19,7 +19,7 @@ use syn::punctuated::Punctuated;
|
||||
pub struct Container<'a> {
|
||||
/// The struct or enum name (without generics).
|
||||
pub ident: syn::Ident,
|
||||
/// Attributes on the structure, parsed for serde.
|
||||
/// Attributes on the structure, parsed for Serde.
|
||||
pub attrs: attr::Container,
|
||||
/// The contents of the struct or enum.
|
||||
pub data: Data<'a>,
|
||||
@ -64,7 +64,7 @@ pub enum Style {
|
||||
}
|
||||
|
||||
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> {
|
||||
let mut attrs = attr::Container::from_ast(cx, item);
|
||||
|
||||
|
@ -6,8 +6,8 @@
|
||||
// option. This file may not be copied, modified, or distributed
|
||||
// except according to those terms.
|
||||
|
||||
//! Utility code to assist converting the case of the source (e.g. `my-field`, `MY_FIELD`) to the
|
||||
//! rust-styled field/variant (e.g. `my_field`, `MyType`).
|
||||
//! Code to convert the Rust-styled field/variant (e.g. `my_field`, `MyType`) to the
|
||||
//! 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
|
||||
#[allow(deprecated, unused_imports)]
|
||||
|
Loading…
Reference in New Issue
Block a user