GNU social JP
  • FAQ
  • Login
GNU social JPは日本のGNU socialサーバーです。
Usage/ToS/admin/test/Pleroma FE
  • Public

    • Public
    • Network
    • Groups
    • Featured
    • Popular
    • People

Embed Notice

HTML Code

Corresponding Notice

  1. Embed this notice
    not nice but a person (unspeaker@mastodon.social)'s status on Wednesday, 21-Aug-2024 22:34:28 JSTnot nice but a personnot nice but a person

    anyone got a clue what's going on here?

    i know what the error message means, but i don't understand what causes `'static` lifetime to be required, considering I've explicitly specified the `'a`.

    there's this answer https://users.rust-lang.org/t/box-with-a-trait-object-requires-static-lifetime/35261/2 but it's from 2019 - did the language change?

    what am i overlooking?

    #rust #rustlang #lifetime #bug #ratatui

    In conversationWednesday, 21-Aug-2024 22:34:28 JST from mastodon.socialpermalink

    Attachments


    1. https://files.mastodon.social/media_attachments/files/113/000/208/748/624/140/original/f9281c7527dce0a4.png
    2. Domain not in remote thumbnail source whitelist: global.discourse-cdn.com
      Box with a trait object requires static lifetime?
      You can write code blocks by enclosing them with triple backticks ```: ```rust struct Holder { ... ``` giving: struct Holder { objects: Vec, } impl Holder { fn add_object ( self: &'_ mut Self, object: T, ) { self.objects .push(Box::new(object)) ; } } Now, regarding the issue at hand, Box is just sugar for Box
  • Help
  • About
  • FAQ
  • TOS
  • Privacy
  • Source
  • Version
  • Contact

GNU social JP is a social network, courtesy of GNU social JP管理人. It runs on GNU social, version 2.0.2-dev, available under the GNU Affero General Public License.

Creative Commons Attribution 3.0 All GNU social JP content and data are available under the Creative Commons Attribution 3.0 license.