Closed orhun closed 2 months ago
Hi @orhun,
Thanks a lot for this PR. I'm taking a look at it but my talk_example/slides.json
is not working. Once I have a solution I'll make You a PR for you PR.
Ups, sorry @orhun - my bad. I've tried to run it in dev mode without first --
before passing argument.
But I run into another issue when I did tried to build release
version:
error[E0277]: the trait bound `std::option::Option<Cow<'_, str>>: From<std::string::String>` is not satisfied
--> src/utils.rs:61:71
|
61 | authors: env!("CARGO_PKG_AUTHORS").replace(':', ", ").into(),
| ^^^^ the trait `From<std::string::String>` is not implemented for `std::option::Option<Cow<'_, str>>`, which is required by `std::string::String: Into<_>`
|
= help: the following other types implement trait `From<T>`:
<std::option::Option<&'a T> as From<&'a std::option::Option<T>>>
<std::option::Option<&'a mut T> as From<&'a mut std::option::Option<T>>>
<std::option::Option<&'a tracing::Id> as From<&'a EnteredSpan>>
<std::option::Option<&'a tracing::Id> as From<&'a tracing::Span>>
<std::option::Option<&'a tracing::Id> as From<&'a tracing_core::span::Current>>
<std::option::Option<&'static tracing::Metadata<'static>> as From<&'a tracing_core::span::Current>>
<std::option::Option<Level> as From<LevelFilter>>
<std::option::Option<T> as From<T>>
and 20 others
= note: required for `std::string::String` to implement `Into<std::option::Option<Cow<'_, str>>>`
error: cannot construct `human_panic::Metadata` with struct literal syntax due to private fields
--> src/utils.rs:58:24
|
58 | let meta = Metadata {
| ^^^^^^^^
59 | version: env!("CARGO_PKG_VERSION").into(),
| ----------------------------------------- private field
60 | name: env!("CARGO_PKG_NAME").into(),
| ----------------------------------- private field
61 | authors: env!("CARGO_PKG_AUTHORS").replace(':', ", ").into(),
| ------------------------------------------------------------ private field
62 | homepage: env!("CARGO_PKG_HOMEPAGE").into(),
| ------------------------------------------- private field
|
= note: ...and other private field `support` that was not provided
help: you might have meant to use the `new` associated function
|
58 | let meta = Metadata::new(_, _);
| ~~~~~~~~~~~
error[E0277]: the trait bound `std::option::Option<Cow<'_, str>>: From<&str>` is not satisfied
--> src/utils.rs:62:27
|
62 | homepage: env!("CARGO_PKG_HOMEPAGE").into(),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^ ---- required by a bound introduced by this call
| |
| the trait `From<&str>` is not implemented for `std::option::Option<Cow<'_, str>>`, which is required by `&str: Into<_>`
|
= help: the following other types implement trait `From<T>`:
<std::option::Option<&'a T> as From<&'a std::option::Option<T>>>
<std::option::Option<&'a mut T> as From<&'a mut std::option::Option<T>>>
<std::option::Option<&'a tracing::Id> as From<&'a EnteredSpan>>
<std::option::Option<&'a tracing::Id> as From<&'a tracing::Span>>
<std::option::Option<&'a tracing::Id> as From<&'a tracing_core::span::Current>>
<std::option::Option<&'static tracing::Metadata<'static>> as From<&'a tracing_core::span::Current>>
<std::option::Option<Level> as From<LevelFilter>>
<std::option::Option<T> as From<T>>
and 20 others
= note: required for `&str` to implement `Into<std::option::Option<Cow<'_, str>>>`
For more information about this error, try `rustc --explain E0277`.
error: could not compile `tui-slides` (bin "tui-slides") due to 3 previous errors
Hmm, what is your Rust version? I'm unable to reproduce :/
rustc --version
will return: rustc 1.81.0 (eeb90cda1 2024-09-04)
and it's installed with rustup in version 1.27.1
This will do when I run cargo build --release
Overall maintenance :)
Unfortunately this is currently blocked by https://github.com/chanq-io/syntect-tui/pull/6