remove dependency on runtime-fmt #773

Merged
OddBloke merged 1 commits from bug/769 into master 4 years ago
OddBloke commented 4 years ago (Migrated from 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 commented 4 years ago (Migrated from 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] commented 4 years ago (Migrated from 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 (Migrated from github.com) approved these changes 4 years ago
igalic (Migrated from github.com) left a comment

👍

👍
OddBloke commented 4 years ago (Migrated from github.com)

Thanks for the merge!

Thanks for the merge!

Reviewers

The pull request has been merged as efb76a3c17.
You can also view command line instructions.

Step 1:

From your project repository, check out a new branch and test the changes.
git checkout -b bug/769 master
git pull origin bug/769

Step 2:

Merge the changes and update on Forgejo.
git checkout master
git merge --no-ff bug/769
git push origin master
Sign in to join this conversation.
No reviewers
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Plume/Plume#773
Loading…
There is no content yet.