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

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

Conversation

Notices

  1. Embed this notice
    らりお・ザ・何らかの🈗然㊌ソムリエ (lo48576@mastodon.cardina1.red)'s status on Thursday, 07-Dec-2023 23:24:14 JST らりお・ザ・何らかの🈗然㊌ソムリエ らりお・ザ・何らかの🈗然㊌ソムリエ
    • かき@GNUsocialJP

    ア゛ーーーー AsRef が lifetime 付きの &'a str を返せない問題!!!

    In conversation Thursday, 07-Dec-2023 23:24:14 JST from mastodon.cardina1.red permalink
    • Embed this notice
      らりお・ザ・何らかの🈗然㊌ソムリエ (lo48576@mastodon.cardina1.red)'s status on Thursday, 07-Dec-2023 23:24:25 JST らりお・ザ・何らかの🈗然㊌ソムリエ らりお・ザ・何らかの🈗然㊌ソムリエ
      in reply to
      • かき@GNUsocialJP

      Into<&'a str> とかで……いや厳しいか……

      In conversation Thursday, 07-Dec-2023 23:24:25 JST permalink
    • Embed this notice
      らりお・ザ・何らかの🈗然㊌ソムリエ (lo48576@mastodon.cardina1.red)'s status on Thursday, 07-Dec-2023 23:24:25 JST らりお・ザ・何らかの🈗然㊌ソムリエ らりお・ザ・何らかの🈗然㊌ソムリエ
      in reply to
      • かき@GNUsocialJP

      pub struct Foo<S>(S);
      impl<S: AsRef<S>> Foo<S> {
      fn as_str(&self) -> &str { s.as_ref() }
      }

      なんだけど、これ Foo<&'a str> からでも &'b str (where Foo: 'b, 'a: 'b) しか返せなくて、そこは &'a str を返してあげたいよねというのが問題の本質

      In conversation Thursday, 07-Dec-2023 23:24:25 JST permalink
    • Embed this notice
      ドッグ (linda_pp@mstdn.jp)'s status on Thursday, 07-Dec-2023 23:24:32 JST ドッグ ドッグ
      in reply to

      @lo48576 コンテキスト分かってないですが AsRef<str> + 'a とかでしょうか?

      In conversation Thursday, 07-Dec-2023 23:24:32 JST permalink

Feeds

  • Activity Streams
  • RSS 2.0
  • Atom
  • 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.