remove dependency on runtime-fmt #773

已合并
OddBloke 4 年前 将 1 次代码提交从 bug/769 合并至 master
OddBloke 评论于 4 年前 (从 github.com 迁移)

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

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
OddBloke 评论于 4 年前 (从 github.com 迁移)

I tested that this is the appropriate replace() invocation by writing the following temporary test:

mod tests {
    #[test]
    fn temp_test() {
        let template = format!(
            "https://{}/remote_interact?target={{uri}}",
            "some_public_domain"
        );
        assert_eq!(
            template.replace("{uri}", "substitute"),
            rt_format!(template, uri = "substitute").unwrap()
        );
    }
}
I tested that this is the appropriate `replace()` invocation by writing the following temporary test: ```rust mod tests { #[test] fn temp_test() { let template = format!( "https://{}/remote_interact?target={{uri}}", "some_public_domain" ); assert_eq!( template.replace("{uri}", "substitute"), rt_format!(template, uri = "substitute").unwrap() ); } } ```
codecov[bot] 评论于 4 年前 (从 github.com 迁移)

Codecov Report

Merging #773 into master will not change coverage.
The diff coverage is 0.00%.

@@           Coverage Diff           @@
##           master     #773   +/-   ##
=======================================
  Coverage   38.96%   38.96%           
=======================================
  Files          73       73           
  Lines        9730     9730           
  Branches     2227     2227           
=======================================
  Hits         3791     3791           
  Misses       4885     4885           
  Partials     1054     1054           
# [Codecov](https://codecov.io/gh/Plume-org/Plume/pull/773?src=pr&el=h1) Report > Merging [#773](https://codecov.io/gh/Plume-org/Plume/pull/773?src=pr&el=desc) into [master](https://codecov.io/gh/Plume-org/Plume/commit/197f0d7ecd008d6c319e4c566cfebf48cb228a90&el=desc) will **not change** coverage. > The diff coverage is `0.00%`. ```diff @@ Coverage Diff @@ ## master #773 +/- ## ======================================= Coverage 38.96% 38.96% ======================================= Files 73 73 Lines 9730 9730 Branches 2227 2227 ======================================= Hits 3791 3791 Misses 4885 4885 Partials 1054 1054 ```
igalic (从 github.com 迁移)4 年前 批准此合并请求
igalic (从 github.com 迁移) 留下了一条评论

👍

👍
OddBloke 评论于 4 年前 (从 github.com 迁移)

Thanks for the merge!

Thanks for the merge!

评审人

该合并请求已作为 efb76a3c17 被合并。
你也可以查看 命令行指令

第一步:

从你的仓库中签出一个新的分支并测试变更。
git checkout -b bug/769 master
git pull origin bug/769

第二步:

合并变更并更新到 Forgejo 上
git checkout master
git merge --no-ff bug/769
git push origin master
登录 并参与到对话中。
无审核者
未选择里程碑
未指派成员
1 名参与者
通知
到期时间
到期日期无效或超出范围。请使用 'yyyy-mm-dd' 格式。

未设置到期时间。

依赖工单

没有设置依赖项。

参考:Plume/Plume#773
正在加载...
这个人很懒,什么都没留下。