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

new constructors for Contour, ContourPoint and possibly others need to deal with identifier/lib args #81

Closed
madig opened this issue Feb 4, 2021 · 0 comments · Fixed by #82

Comments

@madig
Copy link
Collaborator

madig commented Feb 4, 2021

E.g. https://github.com/linebender/norad/blob/v0.3.1/src/glyph/mod.rs#L397-L403 needs to be

    pub fn new(
        points: Vec<ContourPoint>,
        identifier: Option<Identifier>,
        lib: Option<Plist>,
    ) -> Self {
        let mut c = Self { points, identifier: None, lib: None };
        if let Some(id) = identifier {
            c.replace_identifier(id);
        }
        if let Some(lib) = lib {
            c.replace_lib(lib);
        }
        c
    }

or something. Same for other structs that have a identifier/lib field.

Then linebender/runebender#221 can be reverted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant