Skip to content

Commit 17f203d

Browse files
committed
Update ownership
1 parent 9e27832 commit 17f203d

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

1.6/ja/book/ownership.md

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,8 @@ println!("v[0] is: {}", v[0]);
132132

133133
```rust,ignore
134134
fn take(v: Vec<i32>) {
135-
// what happens here isn’t important.
135+
# // what happens here isn’t important.
136+
// ここで何が起きるかは重要ではない
136137
}
137138
138139
let v = vec![1, 2, 3];
@@ -273,9 +274,11 @@ println!("{}", a);
273274

274275
```rust
275276
fn foo(v: Vec<i32>) -> Vec<i32> {
276-
// do stuff with v
277+
# // do stuff with v
278+
// vについての作業を行う
277279

278-
// hand back ownership
280+
# // hand back ownership
281+
// 所有権を返す
279282
v
280283
}
281284
```
@@ -286,9 +289,11 @@ fn foo(v: Vec<i32>) -> Vec<i32> {
286289

287290
```rust
288291
fn foo(v1: Vec<i32>, v2: Vec<i32>) -> (Vec<i32>, Vec<i32>, i32) {
289-
// do stuff with v1 and v2
292+
# // do stuff with v1 and v2
293+
// v1とv2についての作業を行う
290294

291-
// hand back ownership, and the result of our function
295+
# // hand back ownership, and the result of our function
296+
// 所有権と関数の結果を返す
292297
(v1, v2, 42)
293298
}
294299

0 commit comments

Comments
 (0)