Skip to content

Installation error: borrowed value does not live long enough #71

Description

@sambaPython24

Hey, thank you for your work creating this crate!
When I try to install the package using cargo install gltf-viewer I get the error

.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/gltf-0.11.3/src/binary.rs:225:35
    |
119 | impl<'a> Glb<'a> {
    |      -- lifetime `'a` defined here
...
221 |                 let mut buf = vec![0; glb_len as usize];
    |                     ------- binding `buf` declared here
...
225 |                     Self::from_v2(&buf)
    |                     --------------^^^^-
    |                     |             |
    |                     |             borrowed value does not live long enough
    |                     argument requires that `buf` is borrowed for `'a`
...
233 |             }
    |             - `buf` dropped here while still borrowed

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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