Improve: use llm to extract structured data #10
clippy
1 error, 8 warnings
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 1 |
Warning | 8 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.81.0 (eeb90cda1 2024-09-04)
- cargo 1.81.0 (2dbb1af80 2024-08-20)
- clippy 0.1.81 (eeb90cd 2024-09-04)
Annotations
Check warning on line 14 in src/bin/main.rs
github-actions / clippy
unused import: `news_rss::feeds::FetchTopic`
warning: unused import: `news_rss::feeds::FetchTopic`
--> src/bin/main.rs:14:5
|
14 | use news_rss::feeds::FetchTopic;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
Check failure on line 52 in src/bin/main.rs
github-actions / clippy
the method `clone` exists for struct `RssFeeds<PgsqlPublisher, RedisClient, LlmCrawler>`, but its trait bounds were not satisfied
error[E0599]: the method `clone` exists for struct `RssFeeds<PgsqlPublisher, RedisClient, LlmCrawler>`, but its trait bounds were not satisfied
--> src/bin/main.rs:52:29
|
52 | let it_cln = it.clone();
| ^^^^^ method cannot be called on `RssFeeds<PgsqlPublisher, RedisClient, LlmCrawler>` due to unsatisfied trait bounds
|
::: /home/runner/work/news-rss/news-rss/src/crawler/llm/mod.rs:18:1
|
18 | pub struct LlmCrawler {
| --------------------- doesn't satisfy `_: Clone`
|
::: /home/runner/work/news-rss/news-rss/src/publish/pgsql/mod.rs:16:1
|
16 | pub struct PgsqlPublisher {
| ------------------------- doesn't satisfy `_: Clone`
|
::: /home/runner/work/news-rss/news-rss/src/feeds/rss_feeds/mod.rs:28:1
|
28 | pub struct RssFeeds<P, C, S>
| ---------------------------- doesn't satisfy `_: Clone`
|
= note: the full type name has been written to '/home/runner/work/news-rss/news-rss/target/debug/deps/news_rss-1c52f5178bce13f0.long-type-15983329263266178628.txt'
= note: consider using `--verbose` to print the full type name to the console
= note: the following trait bounds were not satisfied:
`news_rss::publish::pgsql::PgsqlPublisher: std::clone::Clone`
which is required by `news_rss::feeds::rss_feeds::RssFeeds<news_rss::publish::pgsql::PgsqlPublisher, news_rss::cache::redis::RedisClient, news_rss::crawler::llm::LlmCrawler>: std::clone::Clone`
`news_rss::crawler::llm::LlmCrawler: std::clone::Clone`
which is required by `news_rss::feeds::rss_feeds::RssFeeds<news_rss::publish::pgsql::PgsqlPublisher, news_rss::cache::redis::RedisClient, news_rss::crawler::llm::LlmCrawler>: std::clone::Clone`
Check warning on line 147 in src/crawler/llm/prompt.rs
github-actions / clippy
constants have by default a `'static` lifetime
warning: constants have by default a `'static` lifetime
--> src/crawler/llm/prompt.rs:147:55
|
147 | pub(super) const _SCRAPE_HTML_SYSTEM_PROMPT_AS_JSON: &'static str = r#"
| -^^^^^^^---- help: consider removing `'static`: `&str`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes
Check warning on line 85 in src/crawler/llm/prompt.rs
github-actions / clippy
constants have by default a `'static` lifetime
warning: constants have by default a `'static` lifetime
--> src/crawler/llm/prompt.rs:85:54
|
85 | pub(super) const _SCRAPE_HTML_SYSTEM_PROMPT_AS_XML: &'static str = r#"
| -^^^^^^^---- help: consider removing `'static`: `&str`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes
Check warning on line 45 in src/crawler/llm/prompt.rs
github-actions / clippy
constants have by default a `'static` lifetime
warning: constants have by default a `'static` lifetime
--> src/crawler/llm/prompt.rs:45:54
|
45 | pub(super) const SCRAPE_HTML_SYSTEM_PROMPT_AS_TEXT: &'static str = r#"
| -^^^^^^^---- help: consider removing `'static`: `&str`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes
Check warning on line 5 in src/crawler/llm/prompt.rs
github-actions / clippy
constants have by default a `'static` lifetime
warning: constants have by default a `'static` lifetime
--> src/crawler/llm/prompt.rs:5:51
|
5 | pub(super) const _SCRAPE_HTML_SYSTEM_PROMPT_SUM: &'static str = r#"
| -^^^^^^^---- help: consider removing `'static`: `&str`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes
Check warning on line 3 in src/crawler/llm/prompt.rs
github-actions / clippy
constants have by default a `'static` lifetime
warning: constants have by default a `'static` lifetime
--> src/crawler/llm/prompt.rs:3:36
|
3 | pub(super) const USER_QUERY_NAME: &'static str = "user-query";
| -^^^^^^^---- help: consider removing `'static`: `&str`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes
Check warning on line 2 in src/crawler/llm/prompt.rs
github-actions / clippy
constants have by default a `'static` lifetime
warning: constants have by default a `'static` lifetime
--> src/crawler/llm/prompt.rs:2:39
|
2 | pub(super) const SYSTEM_PROMPT_NAME: &'static str = "system-prompt";
| -^^^^^^^---- help: consider removing `'static`: `&str`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes
Check warning on line 1 in src/crawler/llm/prompt.rs
github-actions / clippy
constants have by default a `'static` lifetime
warning: constants have by default a `'static` lifetime
--> src/crawler/llm/prompt.rs:1:35
|
1 | pub(super) const LLM_MODEL_NAME: &'static str = "gpt-4o-2024-08-06";
| -^^^^^^^---- help: consider removing `'static`: `&str`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_static_lifetimes
= note: `#[warn(clippy::redundant_static_lifetimes)]` on by default