我的极客时间 Rust 第一课 的代码仓库,随课程更新
tyrchen / geektime-rust Goto Github PK
View Code? Open in Web Editor NEW我的极客时间 Rust 课程的代码仓库,随课程更新
License: Apache License 2.0
我的极客时间 Rust 课程的代码仓库,随课程更新
License: Apache License 2.0
我的极客时间 Rust 第一课 的代码仓库,随课程更新
geektime-rust/04_httpie/src/main.rs
Line 124 in 3c57ef4
geektime-rust/04_httpie/Cargo.toml
Line 9 in 3657d2f
老师您好,在第33讲中的示例中,naive_lock_with_atomic.rs 这个程序运行的最终结果,有时候是100,有时候是10,请问正常吗?
按README.md:
const q = require('.');
const sql = const sql = q.example_sql()
console.log(q.query(sql)); // 报`Uncaught TypeError: not enough arguments`
改用console.log(q.query(sql,"csv"))
正常.
OS: Windows 10
cargo 1.76.0 (c84b36747 2024-01-18)
Running `D:\src\geektime-rust\target\debug\examples\covid.exe`
DataSet(shape: (0, 5)
error: process didn't exit successfully: `D:\src\geektime-rust\target\debug\examples\covid.exe` (exit code: 0xc0000005, STATUS_ACCESS_VIOLATION)
Segmentation fault
downgrade rust to 1.75.0 or upgrade polars to 0.37.0 fix the issue
升级了依赖后,出现了一些错误,能fix 一下吗?
error[E0308]: mismatched types
--> queryer/src/convert.rs:95:39
|
95 | Box::new(Expr::Column(Arc::new(id.to_string()))),
| ------------ ^^^^^^^^^^^^^^^^^^^^^^^^ expected `str`, found struct `std::string::String`
| |
| arguments to this enum variant are incorrect
|
= note: expected struct `std::sync::Arc<str>`
found struct `std::sync::Arc<std::string::String>`
note: tuple variant defined here
--> /Users/nick/.cargo/registry/src/github.com-1ecc6299db9ec823/polars-plan-0.26.1/src/dsl/expr.rs:280:5
|
280 | Column(Arc<str>),
| ^^^^^^
error[E0308]: mismatched types
--> queryer/src/convert.rs:96:17
|
94 | } => Ok(Expr::Alias(
| ----------- arguments to this enum variant are incorrect
95 | Box::new(Expr::Column(Arc::new(id.to_string()))),
96 | Arc::new(alias.to_string()),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `str`, found struct `std::string::String`
|
= note: expected struct `std::sync::Arc<str>`
found struct `std::sync::Arc<std::string::String>`
note: tuple variant defined here
--> /Users/nick/.cargo/registry/src/github.com-1ecc6299db9ec823/polars-plan-0.26.1/src/dsl/expr.rs:279:5
|
279 | Alias(Box<Expr>, Arc<str>),
| ^^^^^
error[E0599]: no variant or associated item named `Wildcard` found for enum `sqlparser::ast::Expr` in the current scope
--> queryer/src/convert.rs:116:22
|
116 | SqlExpr::Wildcard => Ok(Self::Wildcard),
| ^^^^^^^^ variant or associated item not found in `sqlparser::ast::Expr`
error[E0599]: no variant or associated item named `IsNull` found for enum `polars::prelude::Expr` in the current scope
--> queryer/src/convert.rs:117:47
|
117 | SqlExpr::IsNull(expr) => Ok(Self::IsNull(Box::new(Expression(expr).try_into()?))),
| ^^^^^^ variant or associated item not found in `polars::prelude::Expr`
error[E0599]: no variant or associated item named `IsNotNull` found for enum `polars::prelude::Expr` in the current scope
--> queryer/src/convert.rs:118:50
|
118 | SqlExpr::IsNotNull(expr) => Ok(Self::IsNotNull(Box::new(Expression(expr).try_into()?))),
| ^^^^^^^^^ variant or associated item not found in `polars::prelude::Expr`
error[E0308]: mismatched types
--> queryer/src/convert.rs:119:56
|
119 | SqlExpr::Identifier(id) => Ok(Self::Column(Arc::new(id.value))),
| ------------ ^^^^^^^^^^^^^^^^^^ expected `str`, found struct `std::string::String`
| |
| arguments to this enum variant are incorrect
|
= note: expected struct `std::sync::Arc<str>`
found struct `std::sync::Arc<std::string::String>`
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.