Skip to content

Commit fcd962d

Browse files
authored
chore: bump cimg/rust to 1.63.0 (#48)
It looks like `time v0.3.20` has bumped its MSRV to 1.63, therefore we need to update it in CI if we wish to continue using it.
1 parent 727a9b7 commit fcd962d

File tree

4 files changed

+12
-7
lines changed

4 files changed

+12
-7
lines changed

.circleci/config.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ version: 2
33
jobs:
44
build:
55
docker:
6-
- image: cimg/rust:1.60.0
6+
- image: cimg/rust:1.63.0
77
steps:
88
- checkout
99
- run:

contract-tests/src/bin/sse-test-api/main.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ async fn stream(
109109
Err(_) => return HttpResponse::InternalServerError().body("Unable to retrieve handles"),
110110
};
111111

112-
let stream_resource = match req.url_for("stop_stream", &[counter.to_string()]) {
112+
let stream_resource = match req.url_for("stop_stream", [counter.to_string()]) {
113113
Ok(sr) => sr,
114114
Err(_) => {
115115
return HttpResponse::InternalServerError()

contract-tests/src/bin/sse-test-api/stream_entity.rs

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,15 +68,20 @@ impl Inner {
6868
}
6969
};
7070

71-
let mut counter = self.callback_counter.lock().unwrap();
71+
// send_message is only invoked via the event loop, so this access and following
72+
// update will be serialized. The usage of a mutex is for the interior mutability.
73+
let counter_val = *self.callback_counter.lock().unwrap();
7274

7375
match client
74-
.post(format!("{}/{}", self.callback_url, counter))
76+
.post(format!("{}/{}", self.callback_url, counter_val))
7577
.body(format!("{}\n", json))
7678
.send()
7779
.await
7880
{
79-
Ok(_) => *counter += 1,
81+
Ok(_) => {
82+
let mut counter = self.callback_counter.lock().unwrap();
83+
*counter = counter_val + 1
84+
}
8085
Err(e) => {
8186
error!("Failed to send post back to test harness {:?}", e);
8287
return false;

eventsource-client/src/event_parser.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ impl EventData {
3030
}
3131
}
3232

33-
#[derive(Debug, PartialEq)]
33+
#[derive(Debug, Eq, PartialEq)]
3434
pub enum SSE {
3535
Event(Event),
3636
Comment(String),
@@ -70,7 +70,7 @@ impl TryFrom<EventData> for Option<SSE> {
7070
}
7171
}
7272

73-
#[derive(Clone, Debug, PartialEq)]
73+
#[derive(Clone, Debug, Eq, PartialEq)]
7474
pub struct Event {
7575
pub event_type: String,
7676
pub data: String,

0 commit comments

Comments
 (0)