[gnome-maps/wip/mlundblad/es6-modules: 5/22] graphHopperGeocode: Use string templates instead of imports.format
- From: Marcus Lundblad <mlundblad src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-maps/wip/mlundblad/es6-modules: 5/22] graphHopperGeocode: Use string templates instead of imports.format
- Date: Sun, 29 May 2022 20:41:14 +0000 (UTC)
commit bdc4b60718b6dc7374b3cdeb04665d0755f8df74
Author: Marcus Lundblad <ml dfupdate se>
Date: Mon May 23 23:14:38 2022 +0200
graphHopperGeocode: Use string templates instead of imports.format
imports.format is deprecated. Use ES string templates instead.
src/graphHopperGeocode.js | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
---
diff --git a/src/graphHopperGeocode.js b/src/graphHopperGeocode.js
index b74142c3..ebd06aad 100644
--- a/src/graphHopperGeocode.js
+++ b/src/graphHopperGeocode.js
@@ -19,8 +19,6 @@
* Author: Marcus Lundblad <ml update uu se>
*/
-const Format = imports.format;
-
import GLib from 'gi://GLib';
import Soup from 'gi://Soup';
@@ -149,8 +147,7 @@ export class GraphHopperGeocode {
else
query.add('reverse', 'true');
- return Format.vprintf('%s/api/1/geocode?%s', [this._baseUrl,
- query.toString()]);
+ return `${this._baseUrl}/api/1/geocode?${query.toString()}`;
}
_readService() {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]