lunush / rates Goto Github PK
View Code? Open in Web Editor NEWCurrency exchange rates in your terminal πΊπ¦
License: Apache License 2.0
Currency exchange rates in your terminal πΊπ¦
License: Apache License 2.0
Hi
it will be wonderful if there is a timestamp when we view currencies. What do you think?
I cloned this git repository and ran cargo build
, which gave me the following error.
error[E0107]: wrong number of type arguments: expected 3, found 2
--> /home/sudip/.cargo/registry/src/github.com-1ecc6299db9ec823/h2-0.3.0/src/proto/streams/store.rs:15:10
|
15 | ids: IndexMap<StreamId, SlabIndex>,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected 3 type arguments
error: aborting due to previous error
For more information about this error, try `rustc --explain E0107`.
error: could not compile `h2`
I got the same error even when I had just this code inside main.rs
fn main() -> Result<(), std::io::Error> {
Ok(())
}
Output of rustc --version
is rustc 1.50.0 (cb75ad5db 2021-02-10)
. I am learning Rust and I wanted to take this code apart as an exercise, not just install it as a command line tool (which I was able to do using cargo install
).
$ rates BTC USD
1 BTC = 58820.7 USD
This is way off. It's 44k now.
Looking at https://api.coinranking.com/v2/coins - that part seems right. I didn't get deeper into the code though to see where the actual bug is.
infamous glibc :(
I tried running the binary released on my [email protected]
rates: /lib/x86_64-linux-gnu/libc.so.6: version `GLIBC_2.33' not found (required by rates)
There seems to be an error in the beginning of the PKGBUILD:
"https://api.github.com/repos/rates/lunush/releases/latest"
should be changed to:
"https://api.github.com/repos/lunush/rates/releases/latest"
Hi
I install rates via cargo and I got this error. What do you think?
thread 'main' panicked at /home/user/.cargo/registry/src/index.crates.io-6f17d22bba15001f/rates-0.7.0/src/main.rs:159:78:
called Result::unwrap()
on an Err
value: reqwest::Error { kind: Request, url: Url { scheme: "https", cannot_be_a_base: false, username: "", password: None, host: Some(Domain("api.coinranking.com")), port: None, path: "/v2/coins", query: None, fragment: None }, source: hyper::Error(Connect, ConnectError("dns error", Custom { kind: Uncategorized, error: "failed to lookup address information: Temporary failure in name resolution" })) }
note: run with RUST_BACKTRACE=1
environment variable to display a backtrace
$ rates --version
rates 0.6.0
$ RUST_BACKTRACE=full rates 1000 eur cad
thread 'main' panicked at 'range end index 7 out of range for slice of length 6', /home/poboxy/.cargo/registry/src/github.com-1ecc6299db9ec823/rates-0.6.0/src/main.rs:311:18
stack backtrace:
0: 0x557b57d41b2c - std::backtrace_rs::backtrace::libunwind::trace::hb4a65d880d51cc8a
at /rustc/e646f3d2a9541952310778288854943678738ea9/library/std/src/../../backtrace/src/backtrace/libunwind.rs:93:5
1: 0x557b57d41b2c - std::backtrace_rs::backtrace::trace_unsynchronized::h7869122ac9e9e614
at /rustc/e646f3d2a9541952310778288854943678738ea9/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
2: 0x557b57d41b2c - std::sys_common::backtrace::_print_fmt::h9fff32a009da8160
at /rustc/e646f3d2a9541952310778288854943678738ea9/library/std/src/sys_common/backtrace.rs:66:5
3: 0x557b57d41b2c - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h08e4d8f078954af6
at /rustc/e646f3d2a9541952310778288854943678738ea9/library/std/src/sys_common/backtrace.rs:45:22
4: 0x557b57d6671c - core::fmt::write::he3a8c04c34cff473
at /rustc/e646f3d2a9541952310778288854943678738ea9/library/core/src/fmt/mod.rs:1190:17
5: 0x557b57d3b578 - std::io::Write::write_fmt::h885fc3922042c55b
at /rustc/e646f3d2a9541952310778288854943678738ea9/library/std/src/io/mod.rs:1657:15
6: 0x557b57d43f87 - std::sys_common::backtrace::_print::h491ea87d9bc93a80
at /rustc/e646f3d2a9541952310778288854943678738ea9/library/std/src/sys_common/backtrace.rs:48:5
7: 0x557b57d43f87 - std::sys_common::backtrace::print::h172aa49b889b9de8
at /rustc/e646f3d2a9541952310778288854943678738ea9/library/std/src/sys_common/backtrace.rs:35:9
8: 0x557b57d43f87 - std::panicking::default_hook::{{closure}}::h4b688a609ed3ca6c
at /rustc/e646f3d2a9541952310778288854943678738ea9/library/std/src/panicking.rs:295:22
9: 0x557b57d43c4f - std::panicking::default_hook::hcea89d8776676158
at /rustc/e646f3d2a9541952310778288854943678738ea9/library/std/src/panicking.rs:314:9
10: 0x557b57d446ea - std::panicking::rust_panic_with_hook::hca08b43f72502df8
at /rustc/e646f3d2a9541952310778288854943678738ea9/library/std/src/panicking.rs:698:17
11: 0x557b57d443d7 - std::panicking::begin_panic_handler::{{closure}}::hdf2d4b6030b5dc90
at /rustc/e646f3d2a9541952310778288854943678738ea9/library/std/src/panicking.rs:588:13
12: 0x557b57d41fd4 - std::sys_common::backtrace::__rust_end_short_backtrace::hf3c1e0f8da5136c0
at /rustc/e646f3d2a9541952310778288854943678738ea9/library/std/src/sys_common/backtrace.rs:138:18
13: 0x557b57d440d9 - rust_begin_unwind
at /rustc/e646f3d2a9541952310778288854943678738ea9/library/std/src/panicking.rs:584:5
14: 0x557b57aa0993 - core::panicking::panic_fmt::hbb5a63c753f090ac
at /rustc/e646f3d2a9541952310778288854943678738ea9/library/core/src/panicking.rs:143:14
15: 0x557b57aa0b82 - core::slice::index::slice_end_index_len_fail::hd8f75f140e486160
at /rustc/e646f3d2a9541952310778288854943678738ea9/library/core/src/slice/index.rs:43:5
16: 0x557b57aa7314 - rates::main::h4cdf8afd6b6055c6
17: 0x557b57aaf053 - std::sys_common::backtrace::__rust_begin_short_backtrace::h1816050783151935
18: 0x557b57aaf979 - std::rt::lang_start::{{closure}}::hb93ed4ca311d2f83
19: 0x557b57d41211 - core::ops::function::impls::<impl core::ops::function::FnOnce<A> for &F>::call_once::h9f6c70c6863abb0b
at /rustc/e646f3d2a9541952310778288854943678738ea9/library/core/src/ops/function.rs:259:13
20: 0x557b57d41211 - std::panicking::try::do_call::hf6350c75b30bd0f1
at /rustc/e646f3d2a9541952310778288854943678738ea9/library/std/src/panicking.rs:492:40
21: 0x557b57d41211 - std::panicking::try::h67ba605f497cdfdc
at /rustc/e646f3d2a9541952310778288854943678738ea9/library/std/src/panicking.rs:456:19
22: 0x557b57d41211 - std::panic::catch_unwind::h4e6542438b3e71ec
at /rustc/e646f3d2a9541952310778288854943678738ea9/library/std/src/panic.rs:137:14
23: 0x557b57d41211 - std::rt::lang_start_internal::{{closure}}::hf98fc5d7a8caf36d
at /rustc/e646f3d2a9541952310778288854943678738ea9/library/std/src/rt.rs:128:48
24: 0x557b57d41211 - std::panicking::try::do_call::hc31d24a060ec9ed8
at /rustc/e646f3d2a9541952310778288854943678738ea9/library/std/src/panicking.rs:492:40
25: 0x557b57d41211 - std::panicking::try::h8b7f790d459c8fd4
at /rustc/e646f3d2a9541952310778288854943678738ea9/library/std/src/panicking.rs:456:19
26: 0x557b57d41211 - std::panic::catch_unwind::h3d80114f041a858e
at /rustc/e646f3d2a9541952310778288854943678738ea9/library/std/src/panic.rs:137:14
27: 0x557b57d41211 - std::rt::lang_start_internal::h6474f54d5a177436
at /rustc/e646f3d2a9541952310778288854943678738ea9/library/std/src/rt.rs:128:20
28: 0x557b57aa81c2 - main
29: 0x7f4ebeb2d565 - __libc_start_main
30: 0x557b57aa11ce - _start
31: 0x0 - <unknown>
$ echo $?
101
$ RUST_BACKTRACE=full rates 1000 eur cad -t
1000 EUR = 1444 CAD
$ echo $?
0
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.