2018-01-06から1日間の記事一覧
ムーブセマンティクスを忘れていた話。 Builderパターンで以下のように書いたところコンパイラにerror[E0507]: cannot move out of borrowed contentと怒られた。 enum Method { Get, Post, } struct Client { method: Method, } struct ClientBuilder { met…
ムーブセマンティクスを忘れていた話。 Builderパターンで以下のように書いたところコンパイラにerror[E0507]: cannot move out of borrowed contentと怒られた。 enum Method { Get, Post, } struct Client { method: Method, } struct ClientBuilder { met…