Skip to content

Commit

Permalink
fix(ssg): 🐛 Remove the #[allow(box_pointers)] annotation
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastienrousseau committed Sep 10, 2024
1 parent ae9d539 commit c5b4d65
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
1 change: 0 additions & 1 deletion tests/test_compiler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,6 @@ description: My Description
}

#[test]
#[allow(box_pointers)] // Suppress box-pointers lint for this test
fn test_generate_rss() -> Result<(), Box<dyn Error>> {
let options = RssData {
author: "Me".to_string(),
Expand Down
3 changes: 0 additions & 3 deletions tests/test_html.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,6 @@ mod tests {
// }

#[test]
#[allow(box_pointers)] // Suppress box-pointers lint for this test
fn test_post_process_html_with_missing_alt_and_title() {
let html = r#"<img src="image.jpg">"#;
let class_regex = Regex::new(r#"class="[^"]*""#).unwrap();
Expand Down Expand Up @@ -177,7 +176,6 @@ mod tests {
}

#[test]
#[allow(box_pointers)] // Suppress box-pointers lint for this test
fn test_post_process_html_with_empty_input() {
let html = "";
let class_regex = Regex::new(r#"class="[^"]*""#).unwrap();
Expand All @@ -189,7 +187,6 @@ mod tests {
}

#[test]
#[allow(box_pointers)] // Suppress box-pointers lint for this test
fn test_post_process_html_with_invalid_input() {
let html = "<p>Hello</p>\n";
let class_regex = Regex::new(r#"class="[^"]*""#).unwrap();
Expand Down
11 changes: 5 additions & 6 deletions tests/test_rss.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ mod tests {

// Test generating an RSS feed with default options
#[test]
#[allow(box_pointers)] // Suppress box-pointers lint for this test
fn test_generate_rss_with_default_options() {
let options = RssData::new();
let rss_result = generate_rss(&options);
Expand All @@ -66,7 +65,7 @@ mod tests {

// Test generating an RSS feed with some custom options
#[test]
#[allow(box_pointers)] // Suppress box-pointers lint for this test
// Suppress box-pointers lint for this test
fn test_generate_rss_with_custom_options() {
let mut options = RssData::new();
options.title = "My RSS Feed".to_string();
Expand Down Expand Up @@ -94,7 +93,7 @@ mod tests {

// Test macro_write_element function
#[test]
#[allow(box_pointers)] // Suppress box-pointers lint for this test
// Suppress box-pointers lint for this test
fn test_macro_write_element(
) -> Result<(), Box<dyn std::error::Error>> {
let mut writer = Writer::new(Cursor::new(Vec::new()));
Expand All @@ -112,7 +111,7 @@ mod tests {

// Test generating an RSS feed
#[test]
#[allow(box_pointers)] // Suppress box-pointers lint for this test
// Suppress box-pointers lint for this test
fn test_generate_rss() {
let options = RssData::new();
let rss_str = generate_rss(&options);
Expand All @@ -121,7 +120,7 @@ mod tests {

// Test generating an RSS feed with empty title
#[test]
#[allow(box_pointers)] // Suppress box-pointers lint for this test
// Suppress box-pointers lint for this test
fn test_generate_rss_with_empty_title() {
let mut options = RssData::new();
options.title = "".to_string();
Expand All @@ -144,7 +143,7 @@ mod tests {

// Test generating an RSS feed with invalid URL
#[test]
#[allow(box_pointers)] // Suppress box-pointers lint for this test
// Suppress box-pointers lint for this test
fn test_generate_rss_with_invalid_url() {
let mut options = RssData::new();
options.link = "invalid-url".to_string();
Expand Down

0 comments on commit c5b4d65

Please sign in to comment.