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
    naskya::dev (dev@post.naskya.net)'s status on Sunday, 11-May-2025 14:42:23 JST naskya::dev naskya::dev

    @kozakura dtolnay(serde, anyhow, syn, proc-macro2, quote などの作者)は .to_owned() を推しています
    users.rust-lang.org/t/to-string-vs-to-owned-for-string-literals/1441/6

    In conversation about 4 days ago from post.naskya.net permalink

    Attachments

    1. Domain not in remote thumbnail source whitelist: us1.discourse-cdn.com
      `to_string()` vs `to_owned()` for string literals
      I found that my opinion on this has changed significantly over the past 12 months as I have grown more experienced with Rust. I now strongly prefer to_owned() for string literals over either of to_string() or into(). What is the difference between String and &str? An unsatisfactory answer is "one is a string and the other is not a string" because obviously both are strings. Taking something that is a string and converting it to a string using to_string() seems like it misses the point of why ...

    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.