摘要:
This lesson talks about Integer types in Rust and that there are unsigned and signed integers. It also explains how every the type names are composed 阅读全文
posted @ 2024-02-19 21:25
Zhentiw
阅读(11)
评论(0)
推荐(0)
摘要:
This lesson explains Type Inference in Rust and how it allows the compiler to figure out by itself, what type variables have when they get their value 阅读全文
posted @ 2024-02-19 21:17
Zhentiw
阅读(42)
评论(0)
推荐(0)
摘要:
// interface {} is the same as `any` type in Typscript func add(inputs []int) interface {} { return inputs[0].Float() + inputs[1].Float() } 阅读全文
posted @ 2024-02-19 20:58
Zhentiw
阅读(11)
评论(0)
推荐(0)
摘要:
use anyhow::{Result, anyhow}; use std::str::FromStr; fn get_input() -> &'static str { return "0,9 -> 5,9 8,0 -> 0,8 9,4 -> 3,4 2,2 -> 2,1 7,0 -> 7,4 6 阅读全文
posted @ 2024-02-19 16:00
Zhentiw
阅读(12)
评论(0)
推荐(0)
摘要:
package main import ( "fmt" "log" "strconv" "strings" ) type Point struct { x int y int } type Line struct { p1 *Point p2 *Point } func getInput() str 阅读全文
posted @ 2024-02-19 15:58
Zhentiw
阅读(15)
评论(0)
推荐(0)