thanks clippy
This commit is contained in:
parent
b24daeec6e
commit
34ed0a2168
|
@ -990,7 +990,7 @@ dependencies = [
|
|||
|
||||
[[package]]
|
||||
name = "mycelial_technology"
|
||||
version = "0.1.0"
|
||||
version = "0.2.0"
|
||||
dependencies = [
|
||||
"log",
|
||||
"miniserde",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "mycelial_technology"
|
||||
version = "0.1.0"
|
||||
version = "0.2.0"
|
||||
authors = ["glyph <glyph@mycelial.technology>"]
|
||||
edition = "2018"
|
||||
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
extern crate regex;
|
||||
extern crate rss;
|
||||
|
||||
use regex::Regex;
|
||||
use rss::{ChannelBuilder, Item};
|
||||
use std::error;
|
||||
use std::fs;
|
||||
use std::fs::File;
|
||||
use std::io::prelude::*;
|
||||
use regex::Regex;
|
||||
use rss::{ChannelBuilder, Item};
|
||||
|
||||
fn main() -> Result<(), Box<dyn error::Error>> {
|
||||
// create rss channel for mycelial.technology
|
||||
|
@ -25,11 +25,7 @@ fn main() -> Result<(), Box<dyn error::Error>> {
|
|||
let plants = "./templates/plants";
|
||||
|
||||
// add directories to a vector
|
||||
let mut dirs = Vec::new();
|
||||
dirs.push(bacteria);
|
||||
dirs.push(computers);
|
||||
dirs.push(fungi);
|
||||
dirs.push(plants);
|
||||
let dirs = vec![bacteria, computers, fungi, plants];
|
||||
|
||||
// create vectors for item fields
|
||||
let mut titles = Vec::new();
|
||||
|
@ -46,8 +42,7 @@ fn main() -> Result<(), Box<dyn error::Error>> {
|
|||
// populate item url vector from article filenames
|
||||
let re_url = Regex::new("./templates/(.*).html.tera")?;
|
||||
let caps_url = re_url.captures(
|
||||
&path
|
||||
.to_str()
|
||||
path.to_str()
|
||||
.expect("Failed to convert file path to string slice for regex capture"),
|
||||
);
|
||||
if let Some(url) = caps_url {
|
||||
|
|
Loading…
Reference in New Issue