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
    ドッグ (linda_pp@mstdn.jp)'s status on Sunday, 12-Nov-2023 18:07:14 JST ドッグ ドッグ

    &["a", "b"] が &[&str; 2] なのは良いんだけど,これが &[&str] に暗黙変換されないのが地味にテストケース書く時つらい.明示的に変換するのも &["a", "b"][..] もしくは &["a", "b"] as &[_] でパラメータ化した時に毎回書くのは地味に面倒くさい感じ

    In conversation Sunday, 12-Nov-2023 18:07:14 JST from mstdn.jp permalink
    • Embed this notice
      ドッグ (linda_pp@mstdn.jp)'s status on Sunday, 12-Nov-2023 18:09:22 JST ドッグ ドッグ
      in reply to

      #[derive(Debug)]
      struct TestCase {
      lines: &'static [&'static str],
      }

      みたいに明示的に構造体を定義して TestCase { lines: &["a", "b"] } みたいに書いたほうが良いのかな(今は横着してタプル使ってる).しかし,パラメータ化したテスト書く時に毎回構造体書くのが地味に面倒ではある

      In conversation Sunday, 12-Nov-2023 18:09:22 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.