remove dependency on runtime-fmt (#773)
Per the issue, "runtime-fmt uses perma-unstable rust APIs and is therefore susceptible to breakage". This replaces the two calls to rt_format! with .replace() and drops the dependency. Fixes #769
This commit is contained in:
@@ -6,8 +6,6 @@ extern crate gettext_macros;
|
||||
#[macro_use]
|
||||
extern crate rocket;
|
||||
#[macro_use]
|
||||
extern crate runtime_fmt;
|
||||
#[macro_use]
|
||||
extern crate serde_json;
|
||||
#[macro_use]
|
||||
extern crate validator_derive;
|
||||
|
||||
+1
-1
@@ -643,7 +643,7 @@ pub fn remote_interact_post(
|
||||
.and_then(|blog| Post::find_by_slug(&rockets.conn, &slug, blog.id))?;
|
||||
if let Some(uri) = User::fetch_remote_interact_uri(&remote.remote)
|
||||
.ok()
|
||||
.and_then(|uri| rt_format!(uri, uri = target.ap_url).ok())
|
||||
.map(|uri| uri.replace("{uri}", &target.ap_url))
|
||||
{
|
||||
Ok(Redirect::to(uri).into())
|
||||
} else {
|
||||
|
||||
+5
-6
@@ -201,15 +201,14 @@ pub fn follow_not_connected(
|
||||
if let Some(uri) = User::fetch_remote_interact_uri(&remote_form)
|
||||
.ok()
|
||||
.and_then(|uri| {
|
||||
rt_format!(
|
||||
uri,
|
||||
uri = format!(
|
||||
Some(uri.replace(
|
||||
"{uri}",
|
||||
&format!(
|
||||
"{}@{}",
|
||||
target.fqn,
|
||||
target.get_instance(&rockets.conn).ok()?.public_domain
|
||||
)
|
||||
)
|
||||
.ok()
|
||||
),
|
||||
))
|
||||
})
|
||||
{
|
||||
Ok(Redirect::to(uri).into())
|
||||
|
||||
Reference in New Issue
Block a user