Skip to content

Commit

Permalink
update rust edition & rust dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
rlefevre committed Jul 18, 2023
1 parent cd0b554 commit f8a6e1f
Show file tree
Hide file tree
Showing 9 changed files with 1,381 additions and 1,040 deletions.
2,392 changes: 1,372 additions & 1,020 deletions Cargo.lock

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
[package]
name = "greenwood"
version = "1.0.0"
version = "1.0.1"
authors = ["Rémi Lefèvre <[email protected]>"]
edition = "2018"
edition = "2021"

[dependencies]
chrono = "0.4.7"
Expand Down
Binary file modified elm-greenwood.db
Binary file not shown.
16 changes: 2 additions & 14 deletions src/rss.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ use crate::db;
use crate::db::models::Package;
use crate::elm;
use crate::release::Release;
use chrono::{Datelike, Local, TimeZone, Utc};
use chrono::{TimeZone, Utc};
use rss::*;
use std::collections::HashMap;

Expand Down Expand Up @@ -230,22 +230,10 @@ where
{
let mut category = Category::default();
category.set_domain(domain.into());
category.set_name(cdata(location));
category.set_name(location);
category
}

fn cdata<S>(data: S) -> String
where
S: Into<String>,
{
let string = data.into();
if string.contains("<") {
format!("<![CDATA[{}]]>", string)
} else {
string
}
}

fn item_content(package: &Package) -> String {
let version = format!("{}.{}.{}", package.major, package.minor, package.patch);
let mut dependencies: Vec<String> = serde_json::from_str(&package.dependencies)
Expand Down
3 changes: 2 additions & 1 deletion web/src/Package.elm
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ withDomain domain category =

dependencies : Package -> List String
dependencies (Package pkg) =
pkg.dependencies
List.map (String.replace "&lt;" "<") pkg.dependencies


doc : Package -> String
Expand All @@ -161,6 +161,7 @@ doc (Package pkg) =
elmVersion : Package -> String
elmVersion (Package pkg) =
pkg.elmVersion
|> String.replace "&lt;" "<"


guid : Package -> String
Expand Down
Binary file modified web/static/elm.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified web/static/favicon.ico
Binary file not shown.
Binary file modified web/static/greenwood.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions web/static/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@
<title>Elm Greenwood</title>
<link rel="shortcut icon" size="16x16, 32x32, 48x48, 64x64, 128x128, 256x256" href="/favicon.ico">
<link href="https://fonts.googleapis.com/css?family=Source+Code+Pro|Source+Sans+Pro:400,600,700&display=swap" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="/spinner.62ccd50c.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.4/clipboard.min.js"></script>
<script src="/elm.f52a4a75.js"></script>
<link rel="stylesheet" type="text/css" href="/spinner.66445afe.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/clipboard.js/2.0.11/clipboard.min.js"></script>
<script src="/elm.ca6c7c69.js"></script>
</head>
<body>
<script>
Expand Down

0 comments on commit f8a6e1f

Please sign in to comment.