Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • R rusttype
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 22
    • Issues 22
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 3
    • Merge requests 3
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • redox-os
  • rusttype
  • Issues
  • #160
Closed
Open
Created May 10, 2021 by not_a_seagull@not-a-seagull🐦

The "GlyphIter" function should use two seperate lifetimes for its iterator.

GlyphIter is currently defined as:

pub struct GlyphIter<'b, I: Iterator>
where
    I::Item: IntoGlyphId,
{
    font: &'b Font<'b>,
    itr: I,
}

However, consider the case where 'b is static (e.g. I have loaded the Font class using the try_from_vec function). When glyphs_for is called on the Font, it finds that the anonymous reference used for Font is not 'static, so Font is downgraded to some kind of non-static font. This has caused problems for me in my code. The easiest fix for this would be to have two lifetimes in the GlyphIter: one for the borrowed Font and one for the lifetime in the Font object. I am willing to implement a pull request for this issue.

Assignee
Assign to
Time tracking