patchwork: Get rid of dummy URL for test results
diff mbox series

Message ID 20180208043115.9191-1-andrew.donnellan@au1.ibm.com
State Accepted
Headers show
Series
  • patchwork: Get rid of dummy URL for test results
Related show

Commit Message

Andrew Donnellan Feb. 8, 2018, 4:31 a.m. UTC
At some point, Patchwork didn't like it when we submitted a Check without a
target_url attached, so we sent "no.url" as a default.

That appears to have changed, so get rid of the dummy URL.

Signed-off-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>

---

applies on top of current patchwork series, completely untested

v1->v2:
 - remember to change branches before writing patch...
---
 src/patchwork.rs | 10 ----------
 1 file changed, 10 deletions(-)

Patch
diff mbox series

diff --git a/src/patchwork.rs b/src/patchwork.rs
index 17d72a2b91b0..c3c628609474 100644
--- a/src/patchwork.rs
+++ b/src/patchwork.rs
@@ -177,7 +177,6 @@  impl Default for TestState {
 #[derive(Serialize, Default, Clone)]
 pub struct TestResult {
     pub state: TestState,
-    #[serde(serialize_with = "TestResult::serialize_target_url")]
     pub target_url: Option<String>,
     pub description: Option<String>,
     #[serde(serialize_with = "TestResult::serialize_context")]
@@ -185,15 +184,6 @@  pub struct TestResult {
 }
 
 impl TestResult {
-    fn serialize_target_url<S>(target_url: &Option<String>, ser: S)
-                               -> Result<S::Ok, S::Error> where S: Serializer {
-        if target_url.is_none() {
-            serde::Serialize::serialize(&Some("http://no.url".to_string()), ser)
-        } else {
-            serde::Serialize::serialize(target_url, ser)
-        }
-    }
-
     fn serialize_context<S>(context: &Option<String>, ser: S)
                             -> Result<S::Ok, S::Error> where S: Serializer {
         if context.is_none() {