Skip to content

Commit 3eb969f

Browse files
committed
rss: Add crates namespace
1 parent e9b72ec commit 3eb969f

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/tests/worker/rss/snapshots/all__worker__rss__sync_updates_feed__sync_updates_feed-2.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ source: src/tests/worker/rss/sync_updates_feed.rs
33
expression: content
44
---
55
<?xml version="1.0" encoding="utf-8"?>
6-
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
6+
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:crates="https://crates.io/">
77
<channel>
88
<title>crates.io: recent updates</title>
99
<link>https://crates.io/</link>

src/worker/jobs/rss/sync_updates_feed.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,12 +39,16 @@ impl BackgroundJob for SyncUpdatesFeed {
3939
.map(|u| u.into_rss_item(domain))
4040
.collect();
4141

42+
let namespaces = vec![("crates".to_string(), "https://crates.io/".to_string())];
43+
let namespaces = namespaces.into_iter().collect();
44+
4245
let channel = rss::Channel {
4346
title: "crates.io: recent updates".to_string(),
4447
link: format!("https://{domain}/"),
4548
description: "Recent version publishes on the crates.io package registry".to_string(),
4649
language: Some("en".to_string()),
4750
atom_ext: Some(rss::extension::atom::AtomExtension { links: vec![link] }),
51+
namespaces,
4852
items,
4953
..Default::default()
5054
};

0 commit comments

Comments
 (0)