Major post-refactor cleanup
parent: tbd commit: f90d7fb
1 | use Error; |
2 | |
3 | use crate:: |
4 | |
5 | CreateRepositoryRequest, RepositoryFileInspectRequest, RepositoryInfoRequest, |
6 | RepositoryIssueLabelsRequest, RepositoryIssuesCountRequest, RepositoryIssuesRequest, |
7 | , |
8 | , |
9 | ; |
10 | |
11 | use ; |
12 | |
13 | pub async |
14 | message: &NetworkMessage, |
15 | state: &ConnectionState, |
16 | |
17 | if create_repository |
18 | .handle_message |
19 | .await |
20 | .is_ok |
21 | |
22 | Ok |
23 | else if repository_file_inspect |
24 | .handle_message |
25 | .await |
26 | .is_ok |
27 | |
28 | Ok |
29 | else if repository_info |
30 | .handle_message |
31 | .await |
32 | .is_ok |
33 | |
34 | Ok |
35 | else if issues_count.handle_message .await.is_ok |
36 | Ok |
37 | else if issue_labels.handle_message .await.is_ok |
38 | Ok |
39 | else if issues.handle_message .await.is_ok |
40 | Ok |
41 | else |
42 | Err |
43 | |
44 | |
45 | |
46 | async |
47 | Message | : ,
48 | State | : ,
49 | AuthenticatedUser | : AuthenticatedUser,
50 | |
51 | let mut repository_backend = connection_state.repository_backend.lock .await; |
52 | let response = repository_backend |
53 | .create_repository |
54 | .await?; |
55 | |
56 | drop; |
57 | |
58 | connection_state.send .await?; |
59 | |
60 | Ok |
61 | |
62 | |
63 | async |
64 | Message | : ,
65 | State | : ,
66 | user: , |
67 | |
68 | let user = user.map; |
69 | |
70 | let mut repository_backend = connection_state.repository_backend.lock .await; |
71 | let response = repository_backend |
72 | .repository_file_inspect |
73 | .await?; |
74 | |
75 | drop; |
76 | |
77 | connection_state.send .await?; |
78 | |
79 | Ok |
80 | |
81 | |
82 | async |
83 | Message | : ,
84 | State | : ,
85 | user: , |
86 | |
87 | let user = user.map; |
88 | |
89 | let mut repository_backend = connection_state.repository_backend.lock .await; |
90 | let response = repository_backend |
91 | .repository_info |
92 | .await?; |
93 | |
94 | drop; |
95 | |
96 | connection_state.send .await?; |
97 | |
98 | Ok |
99 | |
100 | |
101 | async |
102 | Message | : ,
103 | State | : ,
104 | _user: , |
105 | |
106 | unimplemented!; |
107 | |
108 | |
109 | async |
110 | Message | : ,
111 | State | : ,
112 | _user: , |
113 | |
114 | unimplemented!; |
115 | |
116 | |
117 | async |
118 | Message | : ,
119 | State | : ,
120 | _user: , |
121 | |
122 | unimplemented!; |
123 | |
124 | |
125 | |
126 | |
127 | |
128 | Other, |
129 | |
130 |