Skip to content

Commit

Permalink
Merge pull request #104 from bzy-debug/zhiyuan/float-to-double
Browse files Browse the repository at this point in the history
update float to double
  • Loading branch information
bzy-debug authored Nov 6, 2023
2 parents b9d7c15 + 5f8412c commit c232dfc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ Variables used for string interpolation must support the `to_string` method.
A tuple is a collection of finite values constructed using round brackets `()` with the elements separated by commas `,`. The order of elements matters; for example, `(1,true)` and `(true,1)` have different types. Here's an example:

```go live
fn pack(a: Bool, b: Int, c: String, d: Float) -> (Bool, Int, String, Float) {
fn pack(a: Bool, b: Int, c: String, d: Double) -> (Bool, Int, String, Double) {
(a, b, c, d)
}
fn init {
Expand Down Expand Up @@ -607,7 +607,7 @@ interface Show {
}
```

is automatically implemented by builtin types such as `Int` and `Float`.
is automatically implemented by builtin types such as `Int` and `Double`.

When declaring a generic function/method,
the type parameters can be annotated with the interface they should implement.
Expand Down
4 changes: 2 additions & 2 deletions zh-docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ fn init {
元素的顺序很重要,例如`(1, true)``(true, 1)`是不同的类型。以下是一个例子:

```rust live
fn pack(a: Bool, b: Int, c: String, d: Float) -> (Bool, Int, String, Float) {
fn pack(a: Bool, b: Int, c: String, d: Double) -> (Bool, Int, String, Double) {
(a, b, c, d)
}
fn init {
Expand Down Expand Up @@ -638,7 +638,7 @@ interface Show {
}
```

内置类型如 `Int``Float` 会自动实现这个接口。
内置类型如 `Int``Double` 会自动实现这个接口。

在声明泛型函数/方法时,类型参数可以用它们应该实现的接口进行注解。
例如:
Expand Down

0 comments on commit c232dfc

Please sign in to comment.