Skip to content

Fix for nightly-2020-01-22 #13

@edisno

Description

@edisno

Nightly 2020-01-22 seems to break this crate, can be fixed with this patch which might need to be gated. Perhaps this will help someone.

diff --git a/src/lib.rs b/src/lib.rs
index d34ba54..9b85cb8 100644
--- a/src/lib.rs
+++ b/src/lib.rs
@@ -518,7 +523,7 @@ fn inner_parse<'s, P>(parser: &mut fmt_macros::Parser<'s>, target: &mut P)
                 // previously-implicit values.
                 if fmt.is_none() && (arg.format != DEFAULT_KEY || argument_pos != fmt_len) {
                     fmt = Some((0..fmt_len).map(|i| v1::Argument {
-                        position: v1::Position::At(i),
+                        position: i,
                         format: DEFAULT_VALUE,
                     }).collect::<Vec<_>>());
                 }
@@ -540,7 +545,7 @@ fn inner_parse<'s, P>(parser: &mut fmt_macros::Parser<'s>, target: &mut P)
 
                     // push the format spec and argument value
                     fmt.push(v1::Argument {
-                        position: v1::Position::At(argument_pos),
+                        position: argument_pos,
                         format: spec,
                     })
                 }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions