Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed typos #310

Merged
merged 1 commit into from
Oct 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions impl/src/try_into.rs
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ pub fn expand(input: &DeriveInput, trait_name: &'static str) -> Result<TokenStre

let mut tokens = TokenStream::new();

for ((ref_type, ref original_types), ref multi_field_datas) in variants_per_types {
for ((ref_type, ref original_types), ref multi_field_data) in variants_per_types {
let input_type = &input.ident;

let pattern_ref = ref_type.pattern_ref();
Expand All @@ -55,7 +55,7 @@ pub fn expand(input: &DeriveInput, trait_name: &'static str) -> Result<TokenStre

let mut matchers = vec![];
let vars = &numbered_vars(original_types.len(), "");
for multi_field_data in multi_field_datas {
for multi_field_data in multi_field_data {
let patterns: Vec<_> = vars
.iter()
.map(|var| quote! { #pattern_ref #var })
Expand All @@ -80,7 +80,7 @@ pub fn expand(input: &DeriveInput, trait_name: &'static str) -> Result<TokenStre
.collect::<Vec<_>>();
format!("({})", types.join(", "))
};
let variant_names = multi_field_datas
let variant_names = multi_field_data
.iter()
.map(|d| {
d.variant_name
Expand Down
2 changes: 1 addition & 1 deletion src/as.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ impl<Frm: ?Sized, To: ?Sized> Default for Conv<Frm, To> {

/// Trait performing the specialization.
pub trait ExtractRef {
/// Inout reference type.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does Inout happen to be a technical term I don't know, or is Input correct?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems like a typo to me.

/// Input reference type.
type Frm;
/// Output reference type.
type To;
Expand Down
6 changes: 3 additions & 3 deletions tests/debug.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1010,7 +1010,7 @@ mod generic {
}

#[derive(Debug)]
enum InterpolatedGenericEnumIngored<A, B> {
enum InterpolatedGenericEnumIgnored<A, B> {
#[debug("A {field}")]
A { field: A },
#[debug("B")]
Expand All @@ -1021,12 +1021,12 @@ mod generic {
assert_eq!(
format!(
"{:?}",
InterpolatedGenericEnumIngored::A::<_, u8> { field: NotDebug },
InterpolatedGenericEnumIgnored::A::<_, u8> { field: NotDebug },
),
"A NotDebug",
);
assert_eq!(
format!("{:?}", InterpolatedGenericEnumIngored::B::<u8, _>(NotDebug)),
format!("{:?}", InterpolatedGenericEnumIgnored::B::<u8, _>(NotDebug)),
"B",
);
}
Expand Down