Count the sample chat's ids with zip instead of a loop counter
Newer clippy (nightly) reports explicit_counter_loop for the sample messages' id in dev.rs, which failed `cargo clippy -D warnings` on nightly for voelin-ui. Same ids, 1 upwards. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
767a9dad46
commit
a4aa58f7be
1 file changed
+1
-3
@@ -1634,9 +1634,8 @@ fn demo_chat(app: &mut App, session: u64) {
|
||||
None,
|
||||
),
|
||||
];
|
||||
let mut id = 1;
|
||||
let mut pinned: Vec<HistoryMessage> = Vec::new();
|
||||
for (chat, author, client, text, ago, relay, reactions, pin, topic) in lines {
|
||||
for (id, (chat, author, client, text, ago, relay, reactions, pin, topic)) in (1..).zip(lines) {
|
||||
let target = if chat == DEMO { ChatTarget::Channel(2) } else { ChatTarget::Server };
|
||||
let message = HistoryMessage {
|
||||
id,
|
||||
@@ -1667,7 +1666,6 @@ fn demo_chat(app: &mut App, session: u64) {
|
||||
source: HistorySource::Gateway,
|
||||
complete: false,
|
||||
});
|
||||
id += 1;
|
||||
}
|
||||
// A server chat besides the channel chat.
|
||||
app.handle_event(Event::ChatHistory {
|
||||
|
||||
Reference in new issue
Block a user